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

Unified Diff: cc/layers/picture_layer_impl.cc

Issue 294463002: cc: Reset raster scale if we didn't sync high res tiling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more comments Created 6 years, 7 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/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 8a4e30ee8aeed23cd721254522ffaaeb664b46f8..04131a3e078963bcff2375b359f6040a5d776b9e 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -687,14 +687,25 @@ void PictureLayerImpl::SyncFromActiveLayer(const PictureLayerImpl* other) {
difference_region.Subtract(gfx::Rect(other->bounds()));
invalidation_.Union(difference_region);
+ bool synced_high_res_tiling = false;
if (CanHaveTilings()) {
- tilings_->SyncTilings(
+ synced_high_res_tiling = tilings_->SyncTilings(
*other->tilings_, bounds(), invalidation_, MinimumContentsScale());
} else {
RemoveAllTilings();
}
- SanityCheckTilingState();
+ // If our MinimumContentsScale has changed to prevent the twin's high res
+ // tiling from being synced, we should reset the raster scale and let it be
+ // recalculated (1) again. This can happen if our bounds shrink to the point
+ // where min contents scale grows.
+ // (1) - TODO(vmpstr) Instead of hoping that this will be recalculated, we
+ // should refactor this code a little bit and actually recalculate this.
+ // However, this is a larger undertaking, so this will work for now.
+ if (!synced_high_res_tiling)
+ ResetRasterScale();
+ else
+ SanityCheckTilingState();
}
void PictureLayerImpl::SyncTiling(
« no previous file with comments | « no previous file | cc/layers/picture_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698