summaryrefslogtreecommitdiffstats
path: root/cc/test/tiled_layer_test_common.cc
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-07 17:16:06 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-07 17:16:06 +0000
commitb673495ceefc446c8d482b6f533ab36cc7adb39a (patch)
tree2ff7b82fe7554753218ca3c49499276a2e7ae0a5 /cc/test/tiled_layer_test_common.cc
parent237730f814429a4c2d496bfe3c5c76c68ae933f5 (diff)
downloadchromium_src-b673495ceefc446c8d482b6f533ab36cc7adb39a.zip
chromium_src-b673495ceefc446c8d482b6f533ab36cc7adb39a.tar.gz
chromium_src-b673495ceefc446c8d482b6f533ab36cc7adb39a.tar.bz2
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 R=enne@chromium.org Review URL: https://codereview.chromium.org/14768008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198753 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/tiled_layer_test_common.cc')
-rw-r--r--cc/test/tiled_layer_test_common.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/cc/test/tiled_layer_test_common.cc b/cc/test/tiled_layer_test_common.cc
index ce3d365..0d84090 100644
--- a/cc/test/tiled_layer_test_common.cc
+++ b/cc/test/tiled_layer_test_common.cc
@@ -117,6 +117,8 @@ PrioritizedResourceManager* FakeTiledLayer::ResourceManager() const {
void FakeTiledLayer::UpdateContentsScale(float ideal_contents_scale) {
CalculateContentsScale(ideal_contents_scale,
+ 1.f,
+ 1.f,
false, // animating_transform_to_screen
&draw_properties().contents_scale_x,
&draw_properties().contents_scale_y,
@@ -135,6 +137,8 @@ void FakeTiledLayerWithScaledBounds::SetContentBounds(
void FakeTiledLayerWithScaledBounds::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,