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

Unified Diff: cc/trees/layer_tree_host_pixeltest_masks.cc

Issue 295193002: Get rid of graphics layer anchor points, and replace with transform origin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed. Created 6 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
Index: cc/trees/layer_tree_host_pixeltest_masks.cc
diff --git a/cc/trees/layer_tree_host_pixeltest_masks.cc b/cc/trees/layer_tree_host_pixeltest_masks.cc
index 54c95da6424574f970fb360b61f6e65ed1be5597..62b95b8e57777b2cdc5d344f21ea3138a95aa2aa 100644
--- a/cc/trees/layer_tree_host_pixeltest_masks.cc
+++ b/cc/trees/layer_tree_host_pixeltest_masks.cc
@@ -107,7 +107,7 @@ TEST_F(LayerTreeHostMasksPixelTest, MaskOfClippedLayer) {
// Clip to the top half of the green layer.
scoped_refptr<Layer> clip = Layer::Create();
- clip->SetAnchorPoint(gfx::PointF(0.f, 0.f));
+ clip->SetTransformOrigin(gfx::Point3F(0.f, 0.f, 0.f));
clip->SetPosition(gfx::Point(0, 0));
clip->SetBounds(gfx::Size(200, 100));
clip->SetMasksToBounds(true);
@@ -149,7 +149,7 @@ TEST_F(LayerTreeHostMasksPixelTest, MaskWithReplica) {
replica_transform.Rotate(-90.0);
scoped_refptr<Layer> replica = Layer::Create();
- replica->SetAnchorPoint(gfx::PointF(0.5f, 0.5f));
+ replica->SetTransformOrigin(gfx::Point3F(0.5f, 0.5f, 0.f));
replica->SetPosition(gfx::Point(100, 100));
replica->SetTransform(replica_transform);
green->SetReplicaLayer(replica.get());
@@ -173,7 +173,7 @@ TEST_F(LayerTreeHostMasksPixelTest, MaskWithReplicaOfClippedLayer) {
// Clip to the bottom half of the green layer, and the left half of the
// replica.
scoped_refptr<Layer> clip = Layer::Create();
- clip->SetAnchorPoint(gfx::PointF(0.f, 0.f));
+ clip->SetTransformOrigin(gfx::Point3F(0.f, 0.f, 0.f));
clip->SetPosition(gfx::Point(0, 50));
clip->SetBounds(gfx::Size(150, 150));
clip->SetMasksToBounds(true);
@@ -188,7 +188,7 @@ TEST_F(LayerTreeHostMasksPixelTest, MaskWithReplicaOfClippedLayer) {
replica_transform.Rotate(-90.0);
scoped_refptr<Layer> replica = Layer::Create();
- replica->SetAnchorPoint(gfx::PointF(0.5f, 0.5f));
+ replica->SetTransformOrigin(gfx::Point3F(0.5f, 0.5f, 0.f));
replica->SetPosition(gfx::Point(100, 100));
replica->SetTransform(replica_transform);
green->SetReplicaLayer(replica.get());
@@ -223,7 +223,7 @@ TEST_F(LayerTreeHostMasksPixelTest, MaskOfReplica) {
replica_transform.Translate(100.0, 0.0);
scoped_refptr<Layer> replica = Layer::Create();
- replica->SetAnchorPoint(gfx::PointF(1.f, 1.f));
+ replica->SetTransformOrigin(gfx::Point3F(1.f, 1.f, 0.f));
replica->SetPosition(gfx::Point());
replica->SetTransform(replica_transform);
replica->SetMaskLayer(mask.get());
@@ -247,7 +247,7 @@ TEST_F(LayerTreeHostMasksPixelTest, MaskOfReplicaOfClippedLayer) {
// Clip to the bottom 3/4 of the green layer, and the top 3/4 of the replica.
scoped_refptr<Layer> clip = Layer::Create();
- clip->SetAnchorPoint(gfx::PointF(0.f, 0.f));
+ clip->SetTransformOrigin(gfx::Point3F(0.f, 0.f, 0.f));
clip->SetPosition(gfx::Point(0, 25));
clip->SetBounds(gfx::Size(200, 150));
clip->SetMasksToBounds(true);
@@ -266,7 +266,7 @@ TEST_F(LayerTreeHostMasksPixelTest, MaskOfReplicaOfClippedLayer) {
replica_transform.Translate(100.0, 0.0);
scoped_refptr<Layer> replica = Layer::Create();
- replica->SetAnchorPoint(gfx::PointF(1.f, 1.f));
+ replica->SetTransformOrigin(gfx::Point3F(1.f, 1.f, 0.f));
replica->SetPosition(gfx::Point());
replica->SetTransform(replica_transform);
replica->SetMaskLayer(mask.get());

Powered by Google App Engine
This is Rietveld 408576698