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

Unified Diff: cc/trees/property_tree_unittest.cc

Issue 2148383005: cc: Use sublayer scale from effect tree (2) (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
« cc/trees/draw_property_utils.cc ('K') | « 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 789761c8f3384f52b66c124137c713375378837c..e50b2e4ddaee5930ee1f50488750bde3976dda06 100644
--- a/cc/trees/property_tree_unittest.cc
+++ b/cc/trees/property_tree_unittest.cc
@@ -830,8 +830,13 @@ class PropertyTreeTestComputeTransformWithSublayerScale
EXPECT_TRANSFORMATION_MATRIX_EQ(expected_transform_with_dest_sublayer_scale,
transform);
- success = tree.ComputeTransformWithSourceSublayerScale(
- grand_parent_id, grand_child_id, &transform);
+ success =
+ tree.ComputeTransform(grand_parent_id, grand_child_id, &transform);
+ const TransformNode* grand_parent_node = tree.Node(grand_parent_id);
+ EXPECT_NE(grand_parent_node->sublayer_scale.x(), 0.f);
+ EXPECT_NE(grand_parent_node->sublayer_scale.y(), 0.f);
+ transform.Scale(1.0 / grand_parent_node->sublayer_scale.x(),
+ 1.0 / grand_parent_node->sublayer_scale.y());
EXPECT_TRUE(success);
EXPECT_TRANSFORMATION_MATRIX_EQ(
expected_transform_with_source_sublayer_scale, transform);
@@ -863,8 +868,13 @@ class PropertyTreeTestComputeTransformWithSublayerScale
EXPECT_TRANSFORMATION_MATRIX_EQ(expected_transform_with_dest_sublayer_scale,
transform);
- success = tree.ComputeTransformWithSourceSublayerScale(
- grand_child_id, grand_parent_id, &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->sublayer_scale.x(), 0.f);
+ EXPECT_NE(grand_child_node->sublayer_scale.y(), 0.f);
+ transform.Scale(1.0 / grand_child_node->sublayer_scale.x(),
+ 1.0 / grand_child_node->sublayer_scale.y());
EXPECT_TRUE(success);
EXPECT_TRANSFORMATION_MATRIX_EQ(
expected_transform_with_source_sublayer_scale, transform);
« cc/trees/draw_property_utils.cc ('K') | « cc/trees/property_tree.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698