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

Unified Diff: cc/trees/property_tree_unittest.cc

Issue 2168753002: cc : Use sublayer scale from effect tree (4) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 5 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/trees/property_tree.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/property_tree_unittest.cc
diff --git a/cc/trees/property_tree_unittest.cc b/cc/trees/property_tree_unittest.cc
index 268a97ccfdd66636f64cebb58979f565b3932aaa..597ac799b42bf486ea97da116f1de01bea91a5e6 100644
--- a/cc/trees/property_tree_unittest.cc
+++ b/cc/trees/property_tree_unittest.cc
@@ -828,8 +828,12 @@ class PropertyTreeTestComputeTransformWithSurfaceContentsScale
EXPECT_TRANSFORMATION_MATRIX_EQ(
expected_transform_without_surface_contents_scale, transform);
- success = tree.ComputeTransformWithDestinationSurfaceContentsScale(
- grand_parent_id, grand_child_id, &transform);
+ success =
+ tree.ComputeTransform(grand_parent_id, grand_child_id, &transform);
+ const TransformNode* grand_child_node = tree.Node(grand_child_id);
+ transform.matrix().postScale(grand_child_node->surface_contents_scale.x(),
+ grand_child_node->surface_contents_scale.y(),
+ 1.f);
EXPECT_TRUE(success);
EXPECT_TRANSFORMATION_MATRIX_EQ(
expected_transform_with_dest_surface_contents_scale, transform);
@@ -867,15 +871,17 @@ class PropertyTreeTestComputeTransformWithSurfaceContentsScale
EXPECT_TRANSFORMATION_MATRIX_EQ(
expected_transform_without_surface_contents_scale, transform);
- success = tree.ComputeTransformWithDestinationSurfaceContentsScale(
- grand_child_id, grand_parent_id, &transform);
+ success =
+ tree.ComputeTransform(grand_child_id, grand_parent_id, &transform);
+ transform.matrix().postScale(grand_parent_node->surface_contents_scale.x(),
+ grand_parent_node->surface_contents_scale.y(),
+ 1.f);
EXPECT_TRUE(success);
EXPECT_TRANSFORMATION_MATRIX_EQ(
expected_transform_with_dest_surface_contents_scale, transform);
success =
tree.ComputeTransform(grand_child_id, grand_parent_id, &transform);
- const TransformNode* grand_child_node = tree.Node(grand_child_id);
EXPECT_NE(grand_child_node->surface_contents_scale.x(), 0.f);
EXPECT_NE(grand_child_node->surface_contents_scale.y(), 0.f);
transform.Scale(1.0 / grand_child_node->surface_contents_scale.x(),
« no previous file with comments | « cc/trees/property_tree.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698