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

Unified Diff: cc/damage_tracker_unittest.cc

Issue 11308153: Migrate most of cc/ from WebKit::WebTransformationMatrix to gfx::Transform (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch for landing Created 8 years, 1 month 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/damage_tracker.cc ('k') | cc/delegated_renderer_layer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/damage_tracker_unittest.cc
diff --git a/cc/damage_tracker_unittest.cc b/cc/damage_tracker_unittest.cc
index 008dc93f986c7d4c921d633178203e1e9aae36c9..42eaaafc729aaa1dc6ee4e9fbce5ffd3af2c116b 100644
--- a/cc/damage_tracker_unittest.cc
+++ b/cc/damage_tracker_unittest.cc
@@ -285,8 +285,8 @@ TEST_F(DamageTrackerTest, verifyDamageForTransformedLayer)
scoped_ptr<LayerImpl> root = createAndSetUpTestTreeWithOneSurface();
LayerImpl* child = root->children()[0];
- WebTransformationMatrix rotation;
- rotation.rotate(45);
+ gfx::Transform rotation;
+ rotation.Rotate(45);
clearDamageForAllSurfaces(root.get());
child->setAnchorPoint(gfx::PointF(0.5, 0.5));
@@ -328,11 +328,11 @@ TEST_F(DamageTrackerTest, verifyDamageForPerspectiveClippedLayer)
scoped_ptr<LayerImpl> root = createAndSetUpTestTreeWithOneSurface();
LayerImpl* child = root->children()[0];
- WebTransformationMatrix transform;
- transform.translate3d(500, 500, 0);
- transform.applyPerspective(1);
- transform.rotate3d(0, 45, 0);
- transform.translate3d(-50, -50, 0);
+ gfx::Transform transform;
+ transform.Translate3d(500, 500, 0);
+ transform.ApplyPerspectiveDepth(1);
+ MathUtil::rotateEulerAngles(&transform, 0, 45, 0);
+ transform.Translate3d(-50, -50, 0);
// Set up the child
child->setPosition(gfx::PointF(0, 0));
@@ -833,8 +833,8 @@ TEST_F(DamageTrackerTest, verifyDamageForReplica)
scoped_ptr<LayerImpl> grandChild1Replica = LayerImpl::create(7);
grandChild1Replica->setPosition(gfx::PointF());
grandChild1Replica->setAnchorPoint(gfx::PointF());
- WebTransformationMatrix reflection;
- reflection.scale3d(-1, 1, 1);
+ gfx::Transform reflection;
+ reflection.Scale3d(-1, 1, 1);
grandChild1Replica->setTransform(reflection);
grandChild1->setReplicaLayer(grandChild1Replica.Pass());
}
@@ -986,8 +986,8 @@ TEST_F(DamageTrackerTest, verifyDamageForReplicaMask)
scoped_ptr<LayerImpl> grandChild1Replica = LayerImpl::create(6);
grandChild1Replica->setPosition(gfx::PointF());
grandChild1Replica->setAnchorPoint(gfx::PointF());
- WebTransformationMatrix reflection;
- reflection.scale3d(-1, 1, 1);
+ gfx::Transform reflection;
+ reflection.Scale3d(-1, 1, 1);
grandChild1Replica->setTransform(reflection);
grandChild1->setReplicaLayer(grandChild1Replica.Pass());
}
@@ -1048,8 +1048,8 @@ TEST_F(DamageTrackerTest, verifyDamageForReplicaMaskWithAnchor)
scoped_ptr<LayerImpl> grandChild1Replica = LayerImpl::create(6);
grandChild1Replica->setPosition(gfx::PointF());
grandChild1Replica->setAnchorPoint(gfx::PointF(1, 0)); // This is the anchor being tested.
- WebTransformationMatrix reflection;
- reflection.scale3d(-1, 1, 1);
+ gfx::Transform reflection;
+ reflection.Scale3d(-1, 1, 1);
grandChild1Replica->setTransform(reflection);
grandChild1->setReplicaLayer(grandChild1Replica.Pass());
}
« no previous file with comments | « cc/damage_tracker.cc ('k') | cc/delegated_renderer_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698