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

Unified Diff: cc/layers/layer_utils_unittest.cc

Issue 1908593002: cc : Stop pushing transform origin from Layer and LayerImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/layers/layer_impl_unittest.cc ('k') | cc/test/layer_tree_host_common_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer_utils_unittest.cc
diff --git a/cc/layers/layer_utils_unittest.cc b/cc/layers/layer_utils_unittest.cc
index a6c39a6d27b458a7fe3e5d9888e2cb96a879a7e1..d41b7d06a6679df0c19ebb678d0ebb2c9fe030be 100644
--- a/cc/layers/layer_utils_unittest.cc
+++ b/cc/layers/layer_utils_unittest.cc
@@ -210,8 +210,8 @@ TEST_F(LayerUtilsGetAnimationBoundsTest, RotateXNoPerspective) {
child1()->SetDrawsContent(true);
child1()->SetPosition(gfx::PointF(150.f, 50.f));
child1()->SetBounds(bounds);
- child1()->SetTransformOrigin(
- gfx::Point3F(bounds.width() * 0.5f, bounds.height() * 0.5f, 0));
+ child1()->test_properties()->transform_origin =
+ gfx::Point3F(bounds.width() * 0.5f, bounds.height() * 0.5f, 0);
host_impl().active_tree()->BuildPropertyTreesForTesting();
@@ -235,8 +235,8 @@ TEST_F(LayerUtilsGetAnimationBoundsTest, RotateXWithPerspective) {
// Make the anchor point not the default 0.5 value and line up with the
// child center to make the math easier.
- parent1()->SetTransformOrigin(
- gfx::Point3F(0.375f * 400.f, 0.375f * 400.f, 0.f));
+ parent1()->test_properties()->transform_origin =
+ gfx::Point3F(0.375f * 400.f, 0.375f * 400.f, 0.f);
parent1()->SetBounds(gfx::Size(400, 400));
gfx::Transform perspective;
@@ -247,8 +247,8 @@ TEST_F(LayerUtilsGetAnimationBoundsTest, RotateXWithPerspective) {
child1()->SetDrawsContent(true);
child1()->SetPosition(gfx::PointF(100.f, 100.f));
child1()->SetBounds(bounds);
- child1()->SetTransformOrigin(
- gfx::Point3F(bounds.width() * 0.5f, bounds.height() * 0.5f, 0));
+ child1()->test_properties()->transform_origin =
+ gfx::Point3F(bounds.width() * 0.5f, bounds.height() * 0.5f, 0);
host_impl().active_tree()->BuildPropertyTreesForTesting();
@@ -276,8 +276,8 @@ TEST_F(LayerUtilsGetAnimationBoundsTest, RotateXWithPerspectiveOnSameLayer) {
// Make the anchor point not the default 0.5 value and line up
// with the child center to make the math easier.
- parent1()->SetTransformOrigin(
- gfx::Point3F(0.375f * 400.f, 0.375f * 400.f, 0.f));
+ parent1()->test_properties()->transform_origin =
+ gfx::Point3F(0.375f * 400.f, 0.375f * 400.f, 0.f);
parent1()->SetBounds(gfx::Size(400, 400));
gfx::Transform perspective;
@@ -288,8 +288,8 @@ TEST_F(LayerUtilsGetAnimationBoundsTest, RotateXWithPerspectiveOnSameLayer) {
child1()->SetDrawsContent(true);
child1()->SetPosition(gfx::PointF(100.f, 100.f));
child1()->SetBounds(bounds);
- child1()->SetTransformOrigin(
- gfx::Point3F(bounds.width() * 0.5f, bounds.height() * 0.5f, 0));
+ child1()->test_properties()->transform_origin =
+ gfx::Point3F(bounds.width() * 0.5f, bounds.height() * 0.5f, 0);
host_impl().active_tree()->BuildPropertyTreesForTesting();
@@ -316,8 +316,8 @@ TEST_F(LayerUtilsGetAnimationBoundsTest, RotateZ) {
child1()->SetDrawsContent(true);
child1()->SetPosition(gfx::PointF(150.f, 50.f));
child1()->SetBounds(bounds);
- child1()->SetTransformOrigin(
- gfx::Point3F(bounds.width() * 0.5f, bounds.height() * 0.5f, 0));
+ child1()->test_properties()->transform_origin =
+ gfx::Point3F(bounds.width() * 0.5f, bounds.height() * 0.5f, 0);
host_impl().active_tree()->BuildPropertyTreesForTesting();
@@ -416,8 +416,8 @@ TEST_F(LayerUtilsGetAnimationBoundsTest,
gfx::Size bounds(100, 100);
grand_child()->SetPosition(gfx::PointF(150.f, 50.f));
grand_child()->SetBounds(bounds);
- grand_child()->SetTransformOrigin(
- gfx::Point3F(bounds.width() * 0.5f, bounds.height() * 0.5f, 0));
+ grand_child()->test_properties()->transform_origin =
+ gfx::Point3F(bounds.width() * 0.5f, bounds.height() * 0.5f, 0);
great_grand_child()->SetPosition(gfx::PointF(25.f, 25.f));
great_grand_child()->SetBounds(gfx::Size(50.f, 50.f));
@@ -468,11 +468,11 @@ TEST_F(LayerUtilsGetAnimationBoundsTest,
grand_child()->SetPosition(gfx::PointF(150.f, 50.f));
grand_child()->SetBounds(bounds);
grand_child()->SetTransform(perspective);
- grand_child()->SetTransformOrigin(
- gfx::Point3F(bounds.width() * 0.5f, bounds.height() * 0.5f, 0));
+ grand_child()->test_properties()->transform_origin =
+ gfx::Point3F(bounds.width() * 0.5f, bounds.height() * 0.5f, 0);
- great_grand_child()->SetTransformOrigin(
- gfx::Point3F(bounds.width() * 0.25f, bounds.height() * 0.25f, 0));
+ great_grand_child()->test_properties()->transform_origin =
+ gfx::Point3F(bounds.width() * 0.25f, bounds.height() * 0.25f, 0);
great_grand_child()->SetPosition(gfx::PointF(25.f, 25.f));
great_grand_child()->SetBounds(gfx::Size(50.f, 50.f));
great_grand_child()->SetDrawsContent(true);
@@ -546,8 +546,8 @@ TEST_F(LayerUtilsGetAnimationBoundsTest,
grand_child()->SetPosition(gfx::PointF(150.f, 50.f));
grand_child()->SetBounds(bounds);
- great_grand_child()->SetTransformOrigin(
- gfx::Point3F(bounds.width() * 0.25f, bounds.height() * 0.25f, 0));
+ great_grand_child()->test_properties()->transform_origin =
+ gfx::Point3F(bounds.width() * 0.25f, bounds.height() * 0.25f, 0);
great_grand_child()->SetPosition(gfx::PointF(25.f, 25.f));
great_grand_child()->SetBounds(
gfx::Size(bounds.width() * 0.5f, bounds.height() * 0.5f));
« no previous file with comments | « cc/layers/layer_impl_unittest.cc ('k') | cc/test/layer_tree_host_common_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698