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

Unified Diff: cc/resources/picture_layer_tiling.cc

Issue 240593004: cc: Fix missing compositor invalidations during resize (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Avoid assertion on empty bounds Created 6 years, 8 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 | « cc/base/tiling_data_unittest.cc ('k') | cc/resources/picture_layer_tiling_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/picture_layer_tiling.cc
diff --git a/cc/resources/picture_layer_tiling.cc b/cc/resources/picture_layer_tiling.cc
index d2a732d9eb985e12d15a71405dde751458eb14b2..a3664e770626085c94cf60aa0b25d1b24da3c46a 100644
--- a/cc/resources/picture_layer_tiling.cc
+++ b/cc/resources/picture_layer_tiling.cc
@@ -189,11 +189,15 @@ void PictureLayerTiling::Invalidate(const Region& layer_region) {
void PictureLayerTiling::DoInvalidate(const Region& layer_region,
bool recreate_tiles) {
std::vector<TileMapKey> new_tile_keys;
+ gfx::Rect expanded_live_tiles_rect(
+ tiling_data_.ExpandRectToTileBoundsWithBorders(live_tiles_rect_));
for (Region::Iterator iter(layer_region); iter.has_rect(); iter.next()) {
gfx::Rect layer_rect = iter.rect();
gfx::Rect content_rect =
gfx::ScaleToEnclosingRect(layer_rect, contents_scale_);
- content_rect.Intersect(live_tiles_rect_);
+ // Avoid needless work by not bothering to invalidate where there aren't
+ // tiles.
+ content_rect.Intersect(expanded_live_tiles_rect);
if (content_rect.IsEmpty())
continue;
bool include_borders = true;
« no previous file with comments | « cc/base/tiling_data_unittest.cc ('k') | cc/resources/picture_layer_tiling_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698