| Index: cc/layers/picture_layer_impl.cc
|
| diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc
|
| index 481536b1a04d15bc471dc96c85d63818edd8ce53..fe3b586cc64a7c889be9b0e68cb0db7fb31d71d3 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);
|
| @@ -672,15 +668,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();
|
| }
|
|
|