cc: Pass the device and page scale factor to CalculateContentsScale
The page scale factor affecting a layer is only known by LayerTreeHostCommon,
as the scale factor does not always affect the whole tree, but instead some
subtree. If a picture layer found itself outside the page scale subtree, it
would use the wrong page scale in its computation if it used the value found
on LayerTreeImpl.
Also passes along the device scale for symmetry and to make the data flow as
clear as for page scale.
BUG=235302
[email protected]
Review URL: https://codereview.chromium.org/14768008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198753 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/cc/trees/layer_tree_host_common_unittest.cc b/cc/trees/layer_tree_host_common_unittest.cc
index 7e487a6..f80e4cb 100644
--- a/cc/trees/layer_tree_host_common_unittest.cc
+++ b/cc/trees/layer_tree_host_common_unittest.cc
@@ -5916,12 +5916,16 @@
}
virtual void CalculateContentsScale(float ideal_contents_scale,
+ float device_scale_factor,
+ float page_scale_factor,
bool animating_transform_to_screen,
float* contents_scale_x,
float* contents_scale_y,
gfx::Size* content_bounds) OVERRIDE {
// Skip over the ContentLayer to the base Layer class.
Layer::CalculateContentsScale(ideal_contents_scale,
+ device_scale_factor,
+ page_scale_factor,
animating_transform_to_screen,
contents_scale_x,
contents_scale_y,