Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1790)

Unified Diff: cc/resources/picture_pile.cc

Issue 556973003: cc: Invalidate all new recorded pixels when a layer grows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: invalidateraster: review Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cc/resources/picture_pile_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/picture_pile.cc
diff --git a/cc/resources/picture_pile.cc b/cc/resources/picture_pile.cc
index 0fd3b2a0d2f11de9311c9f8048ebc3084dd95cf3..2ca79bbc1fc05d83a2e1799248089171307ec56f 100644
--- a/cc/resources/picture_pile.cc
+++ b/cc/resources/picture_pile.cc
@@ -323,7 +323,9 @@ bool PicturePile::UpdateAndExpandInvalidation(
int bottom_until = std::max(interest_rect_over_tiles.bottom(), top);
int exposed_left = old_tiling_size.width();
- int exposed_left_until = right;
+ int exposed_left_until = tiling_size().width();
+ int exposed_top = top;
+ int exposed_bottom = tiling_size().height();
DCHECK_GE(exposed_left, left);
gfx::Rect left_rect(left, top, left_until - left, bottom - top);
@@ -331,8 +333,10 @@ bool PicturePile::UpdateAndExpandInvalidation(
gfx::Rect top_rect(left, top, right - left, top_until - top);
gfx::Rect bottom_rect(
left, bottom_until, right - left, bottom - bottom_until);
- gfx::Rect exposed_rect(
- exposed_left, top, exposed_left_until - exposed_left, bottom - top);
+ gfx::Rect exposed_rect(exposed_left,
+ exposed_top,
+ exposed_left_until - exposed_left,
+ exposed_bottom - exposed_top);
resize_invalidation.Union(left_rect);
resize_invalidation.Union(right_rect);
resize_invalidation.Union(top_rect);
@@ -355,7 +359,9 @@ bool PicturePile::UpdateAndExpandInvalidation(
int right_until = std::max(interest_rect_over_tiles.right(), left);
int exposed_top = old_tiling_size.height();
- int exposed_top_until = bottom;
+ int exposed_top_until = tiling_size().height();
+ int exposed_left = left;
+ int exposed_right = tiling_size().width();
DCHECK_GE(exposed_top, top);
gfx::Rect left_rect(left, top, left_until - left, bottom - top);
@@ -363,8 +369,10 @@ bool PicturePile::UpdateAndExpandInvalidation(
gfx::Rect top_rect(left, top, right - left, top_until - top);
gfx::Rect bottom_rect(
left, bottom_until, right - left, bottom - bottom_until);
- gfx::Rect exposed_rect(
- left, exposed_top, right - left, exposed_top_until - exposed_top);
+ gfx::Rect exposed_rect(exposed_left,
+ exposed_top,
+ exposed_right - exposed_left,
+ exposed_top_until - exposed_top);
resize_invalidation.Union(left_rect);
resize_invalidation.Union(right_rect);
resize_invalidation.Union(top_rect);
« no previous file with comments | « no previous file | cc/resources/picture_pile_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698