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

Unified Diff: cc/layers/picture_layer_impl.cc

Issue 132083007: cc: don't add low-res tiling to GPU rasterized layers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update comment. Created 6 years, 11 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_impl.h ('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 08b42c5f63a7d6d690033e9a99390f6810a7bf24..22281ccdf7c54bccc296a4e39677ff08221f3de1 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -945,8 +945,9 @@ void PictureLayerImpl::ManageTilings(bool animating_transform_to_screen) {
// prevents wastefully creating a paired low res tiling for every new high res
// tiling during a pinch or a CSS animation.
bool is_pinching = layer_tree_impl()->PinchGestureActive();
- if (!is_pinching && !animating_transform_to_screen && !low_res &&
- low_res != high_res)
+ if (ShouldHaveLowResTiling() && !is_pinching &&
+ !animating_transform_to_screen &&
+ !low_res && low_res != high_res)
low_res = AddTiling(low_res_raster_contents_scale_);
// Set low-res if we have one.
@@ -1092,8 +1093,8 @@ void PictureLayerImpl::CleanUpTilingsOnActiveLayer(
tiling->contents_scale() <= max_acceptable_high_res_scale)
continue;
- // Low resolution can't activate, so only keep one around.
- if (tiling->resolution() == LOW_RESOLUTION)
+ // Keep low resolution tilings, if the layer should have them.
+ if (tiling->resolution() == LOW_RESOLUTION && ShouldHaveLowResTiling())
continue;
// Don't remove tilings that are being used (and thus would cause a flash.)
« no previous file with comments | « cc/layers/picture_layer_impl.h ('k') | cc/layers/picture_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698