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

Unified Diff: cc/trees/layer_tree_host_common_unittest.cc

Issue 2011063002: cc: Use ScreenSpaceTransform to determine content scale (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make layout test need-auto-rebaseline Created 4 years, 7 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/test/layer_tree_host_common_test.cc ('k') | third_party/WebKit/LayoutTests/TestExpectations » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_common_unittest.cc
diff --git a/cc/trees/layer_tree_host_common_unittest.cc b/cc/trees/layer_tree_host_common_unittest.cc
index e9724dc9e64085f4d2427fe15cca823fc5ad57da..2a2ca196f6278a3fd4e6a6584bc15eaa11e508b9 100644
--- a/cc/trees/layer_tree_host_common_unittest.cc
+++ b/cc/trees/layer_tree_host_common_unittest.cc
@@ -4625,7 +4625,13 @@ TEST_F(LayerTreeHostCommonScalingTest, SurfaceLayerTransformsInHighDPI) {
SetLayerPropertiesForTesting(root, identity_matrix, gfx::Point3F(),
gfx::PointF(), gfx::Size(100, 100), false, true,
false);
- LayerImpl* parent = AddChildToRoot<LayerImpl>();
+
+ LayerImpl* page_scale = AddChildToRoot<LayerImpl>();
+ SetLayerPropertiesForTesting(page_scale, identity_matrix, gfx::Point3F(),
+ gfx::PointF(), gfx::Size(100, 100), false, true,
+ false);
+
+ LayerImpl* parent = AddChild<LayerImpl>(page_scale);
parent->SetDrawsContent(true);
SetLayerPropertiesForTesting(parent, identity_matrix, gfx::Point3F(),
gfx::PointF(), gfx::Size(100, 100), false, true,
@@ -4646,6 +4652,12 @@ TEST_F(LayerTreeHostCommonScalingTest, SurfaceLayerTransformsInHighDPI) {
float device_scale_factor = 2.5f;
float page_scale_factor = 3.f;
+ root->layer_tree_impl()->SetViewportLayersFromIds(
+ Layer::INVALID_ID, page_scale->id(), Layer::INVALID_ID,
+ Layer::INVALID_ID);
+ root->layer_tree_impl()->SetDeviceScaleFactor(device_scale_factor);
+ root->layer_tree_impl()->BuildPropertyTreesForTesting();
+ root->layer_tree_impl()->SetPageScaleOnActiveTree(page_scale_factor);
ExecuteCalculateDrawProperties(root, device_scale_factor, page_scale_factor,
root);
« no previous file with comments | « cc/test/layer_tree_host_common_test.cc ('k') | third_party/WebKit/LayoutTests/TestExpectations » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698