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

Unified Diff: cc/layers/picture_layer_impl.cc

Issue 294163009: cc: Expand invalidation to full tile when recording is missing for the tile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: pictureslow: don't change region while iterating it Created 6 years, 6 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/layers/picture_layer.cc ('k') | cc/resources/picture_pile.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/picture_layer_impl.cc
diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc
index eabfdc69b844f609b90de612f2c735facf69f134..0ebd0e4dc7e6ff4bf03e1cca0be1ddd23b24cd3f 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -626,6 +626,7 @@ gfx::Size PictureLayerImpl::CalculateTileSize(
}
void PictureLayerImpl::SyncFromActiveLayer(const PictureLayerImpl* other) {
+ TRACE_EVENT0("cc", "SyncFromActiveLayer");
DCHECK(!other->needs_post_commit_initialization_);
DCHECK(other->tilings_);
@@ -640,23 +641,6 @@ void PictureLayerImpl::SyncFromActiveLayer(const PictureLayerImpl* other) {
raster_contents_scale_ = other->raster_contents_scale_;
low_res_raster_contents_scale_ = other->low_res_raster_contents_scale_;
- // Add synthetic invalidations for any recordings that were dropped. As
- // tiles are updated to point to this new pile, this will force the dropping
- // of tiles that can no longer be rastered. This is not ideal, but is a
- // trade-off for memory (use the same pile as much as possible, by switching
- // during DidBecomeActive) and for time (don't bother checking every tile
- // during activation to see if the new pile can still raster it).
- for (int x = 0; x < pile_->num_tiles_x(); ++x) {
- for (int y = 0; y < pile_->num_tiles_y(); ++y) {
- bool previously_had = other->pile_->HasRecordingAt(x, y);
- bool now_has = pile_->HasRecordingAt(x, y);
- if (now_has || !previously_had)
- continue;
- gfx::Rect layer_rect = pile_->tile_bounds(x, y);
- invalidation_.Union(layer_rect);
- }
- }
-
// Union in the other newly exposed regions as invalid.
Region difference_region = Region(gfx::Rect(bounds()));
difference_region.Subtract(gfx::Rect(other->bounds()));
« no previous file with comments | « cc/layers/picture_layer.cc ('k') | cc/resources/picture_pile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698