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

Unified Diff: cc/layers/picture_layer_impl.cc

Issue 397303003: cc: Remove invalidated recycle tree tiles on activation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update Created 6 years, 5 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_layer_tiling.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 02fb92fb735dce8d5048487eebe38ab6800c7706..4a7e0c0b0b66ae5bdf20743b65c0f51c69824c0d 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -108,6 +108,10 @@ void PictureLayerImpl::PushPropertiesTo(LayerImpl* base_layer) {
// Tilings would be expensive to push, so we swap.
layer_impl->tilings_.swap(tilings_);
+ // Remove invalidated tiles from what will become a recycle tree.
+ if (tilings_)
+ tilings_->RemoveTilesInRegion(invalidation_);
+
layer_impl->tilings_->SetClient(layer_impl);
if (tilings_)
tilings_->SetClient(this);
@@ -670,20 +674,10 @@ void PictureLayerImpl::SyncFromActiveLayer(const PictureLayerImpl* other) {
raster_contents_scale_ = other->raster_contents_scale_;
low_res_raster_contents_scale_ = other->low_res_raster_contents_scale_;
- // The tilings on this layer were swapped here from the active layer on
- // activation, so they have not seen the invalidation that was given to
- // the active layer. So union that invalidation in here, but don't save
- // it and pass it back to the active layer again.
- Region invalidation_from_pending_and_active =
- UnionRegions(invalidation_, other->invalidation_);
-
bool synced_high_res_tiling = false;
if (CanHaveTilings()) {
- synced_high_res_tiling =
- tilings_->SyncTilings(*other->tilings_,
- bounds(),
- invalidation_from_pending_and_active,
- MinimumContentsScale());
+ synced_high_res_tiling = tilings_->SyncTilings(
+ *other->tilings_, bounds(), invalidation_, MinimumContentsScale());
} else {
RemoveAllTilings();
}
« no previous file with comments | « no previous file | cc/resources/picture_layer_tiling.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698