cc: Reduce surface contents scale adjustments.
This avoids updating the surface contents scale based on the current
transform if layer_transforms_should_scale_layer_contents is false. The
result is that render surfaces size doesn't need to be adjusted during
transform animations in the Chrome OS UI. This is a prerequisite to
caching of render surfaces and is the preferred behavior as UI raster
scale should not change during these animations.
BUG=708513
TEST=cc_unittests --gtest_filter=LayerTreeHostCommonTest.CanAdjustRasterScaleTest
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel
Review-Url: https://codereview.chromium.org/2795963002
Cr-Commit-Position: refs/heads/master@{#462684}
diff --git a/cc/layers/render_surface_impl_unittest.cc b/cc/layers/render_surface_impl_unittest.cc
index 351d2acb..49f2f7d 100644
--- a/cc/layers/render_surface_impl_unittest.cc
+++ b/cc/layers/render_surface_impl_unittest.cc
@@ -72,7 +72,9 @@
scoped_refptr<FakeRasterSource> raster_source =
FakeRasterSource::CreateFilledSolidColor(layer_size);
- LayerTestCommon::LayerImplTest impl;
+ LayerTreeSettings settings;
+ settings.layer_transforms_should_scale_layer_contents = true;
+ LayerTestCommon::LayerImplTest impl(settings);
std::unique_ptr<LayerImpl> root =
LayerImpl::Create(impl.host_impl()->active_tree(), 2);
std::unique_ptr<LayerImpl> surface =