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

Unified Diff: cc/layers/picture_image_layer_impl.cc

Issue 81453002: Reland: CC: Adjust tiling creation triggers during pinch-zoom. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@CC_soon_bin_optimization_REDUCE_ZOOM_OUT_MEMORY_V2
Patch Set: Rebase. Created 7 years, 1 month 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_image_layer_impl.h ('k') | cc/layers/picture_layer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/picture_image_layer_impl.cc
diff --git a/cc/layers/picture_image_layer_impl.cc b/cc/layers/picture_image_layer_impl.cc
index 199aec3829bb090b6bcfb6f704a2a752bb786d35..b9a57f2b7b0c4f4a9fb87b4051f8c8696df2e31e 100644
--- a/cc/layers/picture_image_layer_impl.cc
+++ b/cc/layers/picture_image_layer_impl.cc
@@ -58,15 +58,16 @@ bool PictureImageLayerImpl::ShouldAdjustRasterScale(
return false;
}
-void PictureImageLayerImpl::CalculateRasterContentsScale(
- bool animating_transform_to_screen,
- float* raster_contents_scale,
- float* low_res_raster_contents_scale) const {
+void PictureImageLayerImpl::RecalculateRasterScales(
+ bool animating_transform_to_screen) {
+ // Defaults from PictureLayerImpl.
+ PictureLayerImpl::RecalculateRasterScales(animating_transform_to_screen);
+
// Don't scale images during rastering to ensure image quality, save memory
// and avoid frequent re-rastering on change of scale.
- *raster_contents_scale = std::max(1.f, MinimumContentsScale());
+ raster_contents_scale_ = std::max(1.f, MinimumContentsScale());
// We don't need low res tiles.
- *low_res_raster_contents_scale = *raster_contents_scale;
+ low_res_raster_contents_scale_ = raster_contents_scale_;
}
} // namespace cc
« no previous file with comments | « cc/layers/picture_image_layer_impl.h ('k') | cc/layers/picture_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698