diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-06 23:39:30 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-06 23:39:30 +0000 |
commit | dd0158145384339de1e7a34267401a9dc57f1ed9 (patch) | |
tree | 7f9fac4ebab0e236ccd709c0c770370bf9d42a80 /chrome/renderer/render_widget.cc | |
parent | 9fb1da3d87f9efae2351f006fd79242984dd31cd (diff) | |
download | chromium_src-dd0158145384339de1e7a34267401a9dc57f1ed9.zip chromium_src-dd0158145384339de1e7a34267401a9dc57f1ed9.tar.gz chromium_src-dd0158145384339de1e7a34267401a9dc57f1ed9.tar.bz2 |
Allow painting multiple paint rects.
Previously, if there was no scrolling, then we would always paint the union of
any invalidations. With this change, if the area of the invalidation rects is
sufficiently less than the area of the union, then we will just paint the
individual invalidation rects.
This may regress page cycler performance (see http://crbug.com/29589).
R=brettw
BUG=50303
TEST=updated unit tests
Review URL: http://codereview.chromium.org/5613002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68403 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/render_widget.cc')
-rw-r--r-- | chrome/renderer/render_widget.cc | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/chrome/renderer/render_widget.cc b/chrome/renderer/render_widget.cc index ee1ccd9..13c194d 100644 --- a/chrome/renderer/render_widget.cc +++ b/chrome/renderer/render_widget.cc @@ -467,8 +467,8 @@ void RenderWidget::DoDeferredUpdate() { // OK, save the pending update to a local since painting may cause more // invalidation. Some WebCore rendering objects only layout when painted. - PaintAggregator::PendingUpdate update = paint_aggregator_.GetPendingUpdate(); - paint_aggregator_.ClearPendingUpdate(); + PaintAggregator::PendingUpdate update; + paint_aggregator_.PopPendingUpdate(&update); gfx::Rect scroll_damage = update.GetScrollDamage(); gfx::Rect bounds = update.GetPaintBounds().Union(scroll_damage); @@ -505,13 +505,6 @@ void RenderWidget::DoDeferredUpdate() { 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. See bug 29589. - if (update.scroll_rect.IsEmpty()) { - update.paint_rects.clear(); - update.paint_rects.push_back(bounds); - } - // The scroll damage is just another rectangle to paint and copy. copy_rects.swap(update.paint_rects); if (!scroll_damage.IsEmpty()) |