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

Unified Diff: cc/layers/picture_layer_impl.cc

Issue 2289123005: Don't adjust raster scale differently for SW/GPU during Animation (Closed)
Patch Set: unit test Created 4 years, 4 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 776507af0f83478662d77943cc4a4ba3af47e0ce..1a5bb8926b294b4b645a9c67e536d1b0c55e2e0b 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -926,11 +926,6 @@ bool PictureLayerImpl::ShouldAdjustRasterScale() const {
draw_properties().screen_space_transform_is_animating)
return true;
- if (draw_properties().screen_space_transform_is_animating &&
- raster_contents_scale_ != ideal_contents_scale_ &&
- ShouldAdjustRasterScaleDuringScaleAnimations())
- return true;
-
bool is_pinching = layer_tree_impl()->PinchGestureActive();
if (is_pinching && raster_page_scale_) {
// We change our raster scale when it is:
@@ -1054,14 +1049,13 @@ void PictureLayerImpl::RecalculateRasterScales() {
raster_contents_scale_ / raster_device_scale_ / raster_source_scale_;
}
- // If we're not re-rasterizing during animation, rasterize at the maximum
- // scale that will occur during the animation, if the maximum scale is
- // known. However we want to avoid excessive memory use. If the scale is
- // smaller than what we would choose otherwise, then it's always better off
- // for us memory-wise. But otherwise, we don't choose a scale at which this
- // layer's rastered content would become larger than the viewport.
- if (draw_properties().screen_space_transform_is_animating &&
- !ShouldAdjustRasterScaleDuringScaleAnimations()) {
+ // We rasterize at the maximum scale that will occur during the animation, if
+ // the maximum scale is known. However we want to avoid excessive memory use.
+ // If the scale is smaller than what we would choose otherwise, then it's
+ // always better off for us memory-wise. But otherwise, we don't choose a
+ // scale at which this layer's rastered content would become larger than the
+ // viewport.
+ if (draw_properties().screen_space_transform_is_animating) {
bool can_raster_at_maximum_scale = false;
bool should_raster_at_starting_scale = false;
CombinedAnimationScale animation_scales =
@@ -1235,10 +1229,6 @@ void PictureLayerImpl::SanityCheckTilingState() const {
#endif
}
-bool PictureLayerImpl::ShouldAdjustRasterScaleDuringScaleAnimations() const {
- return layer_tree_impl()->use_gpu_rasterization();
-}
-
float PictureLayerImpl::MaximumTilingContentsScale() const {
float max_contents_scale = tilings_->GetMaximumContentsScale();
return std::max(max_contents_scale, MinimumContentsScale());
« 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