summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/render_widget.cc
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-07 04:15:39 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-07 04:15:39 +0000
commitb36d9baa98e397fd194716a6041083ed989524c8 (patch)
tree335b3e294a41f795af59f72b1fc1cc0c6f171752 /chrome/renderer/render_widget.cc
parent6e41eae8b3ea421a67104fe1849d5f261a4f2b20 (diff)
downloadchromium_src-b36d9baa98e397fd194716a6041083ed989524c8.zip
chromium_src-b36d9baa98e397fd194716a6041083ed989524c8.tar.gz
chromium_src-b36d9baa98e397fd194716a6041083ed989524c8.tar.bz2
Coalesce damage rects that share an edge.
This fixes the Bloat HTTP page cycler regression, and allows me to remove the hack I checked in to disable multiple-paints due to an observed DHTML page cycler regression. I added a new histogram, RW_IntermediatePaintRectCount, that would have shown the problem clearly had it been there before. I included some cleanup in PaintAggregator: 1- rename "r" to "existing_rect" for clarity 2- check for contained (i.e., redundant) invalidates up front I also changed the opacity of the paint rects used when --show-paint-rects is specified. I find myself dogfooding with this command line option enabled, and I want it to be a little less annoying but still just as useful. R=brettw BUG=29477 TEST=none Review URL: http://codereview.chromium.org/464057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33949 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/render_widget.cc')
-rw-r--r--chrome/renderer/render_widget.cc12
1 files changed, 3 insertions, 9 deletions
diff --git a/chrome/renderer/render_widget.cc b/chrome/renderer/render_widget.cc
index 388dd59..5d56a41 100644
--- a/chrome/renderer/render_widget.cc
+++ b/chrome/renderer/render_widget.cc
@@ -393,7 +393,7 @@ void RenderWidget::PaintDebugBorder(const gfx::Rect& rect,
SkPaint paint;
paint.setStyle(SkPaint::kStroke_Style);
- paint.setColor(SkColorSetARGB(0x7F, 0xFF, 0, 0));
+ paint.setColor(SkColorSetARGB(0x3F, 0xFF, 0, 0));
paint.setStrokeWidth(1);
SkIRect irect;
@@ -484,14 +484,8 @@ void RenderWidget::DoDeferredUpdate() {
bounds.set_width(canvas->getDevice()->width());
bounds.set_height(canvas->getDevice()->height());
- HISTOGRAM_COUNTS_100("MPArch.RW_PaintRectCount", update.paint_rects.size());
-
- // TODO(darin): re-enable painting multiple damage rects once the
- // page-cycler regressions are resolved.
- if (update.scroll_rect.IsEmpty()) {
- update.paint_rects.clear();
- update.paint_rects.push_back(bounds);
- }
+ HISTOGRAM_COUNTS_10000("MPArch.RW_PaintRectCount",
+ update.paint_rects.size());
for (size_t i = 0; i < update.paint_rects.size(); ++i)
PaintRect(update.paint_rects[i], bounds.origin(), canvas.get());