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

Unified Diff: cc/layers/picture_layer_impl.cc

Issue 375923005: cc: Explicitly invalidate all dropped recordings on the main thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: invalid-resize: resizedeletestiles 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 | « cc/layers/picture_layer.cc ('k') | cc/layers/picture_layer_impl_unittest.cc » ('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 094cd4f2f08e9eaa6cfdb9733dd281a9b85931d4..c25bba5a98b6c108a84d64c486c7afe2c853c498 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -108,10 +108,6 @@ void PictureLayerImpl::PushPropertiesTo(LayerImpl* base_layer) {
// Tilings would be expensive to push, so we swap.
layer_impl->tilings_.swap(tilings_);
- // Ensure that we don't have any tiles that are out of date.
- if (tilings_)
- tilings_->RemoveTilesInRegion(invalidation_);
-
layer_impl->tilings_->SetClient(layer_impl);
if (tilings_)
tilings_->SetClient(this);
@@ -676,15 +672,20 @@ void PictureLayerImpl::SyncFromActiveLayer(const PictureLayerImpl* other) {
raster_contents_scale_ = other->raster_contents_scale_;
low_res_raster_contents_scale_ = other->low_res_raster_contents_scale_;
- // Union in the other newly exposed regions as invalid.
- Region difference_region = Region(gfx::Rect(bounds()));
- difference_region.Subtract(gfx::Rect(other->bounds()));
- invalidation_.Union(difference_region);
+ // 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_, MinimumContentsScale());
+ synced_high_res_tiling =
+ tilings_->SyncTilings(*other->tilings_,
+ bounds(),
+ invalidation_from_pending_and_active,
+ MinimumContentsScale());
} else {
RemoveAllTilings();
}
« no previous file with comments | « cc/layers/picture_layer.cc ('k') | cc/layers/picture_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698