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

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: Fix nit. Created 6 years, 6 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/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_host_pixeltest_on_demand_raster.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..9b386866ee3c4f67e023132aad95faf6a69804c7 100644
--- a/cc/trees/layer_tree_host_pixeltest_masks.cc
+++ b/cc/trees/layer_tree_host_pixeltest_masks.cc
@@ -107,7 +107,6 @@ 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->SetPosition(gfx::Point(0, 0));
clip->SetBounds(gfx::Size(200, 100));
clip->SetMasksToBounds(true);
@@ -149,7 +148,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(50.f, 50.f, 0.f));
replica->SetPosition(gfx::Point(100, 100));
replica->SetTransform(replica_transform);
green->SetReplicaLayer(replica.get());
@@ -173,7 +172,6 @@ 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->SetPosition(gfx::Point(0, 50));
clip->SetBounds(gfx::Size(150, 150));
clip->SetMasksToBounds(true);
@@ -188,7 +186,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(50.f, 50.f, 0.f));
replica->SetPosition(gfx::Point(100, 100));
replica->SetTransform(replica_transform);
green->SetReplicaLayer(replica.get());
@@ -223,7 +221,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(100.f, 100.f, 0.f));
replica->SetPosition(gfx::Point());
replica->SetTransform(replica_transform);
replica->SetMaskLayer(mask.get());
@@ -247,7 +245,6 @@ 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->SetPosition(gfx::Point(0, 25));
clip->SetBounds(gfx::Size(200, 150));
clip->SetMasksToBounds(true);
@@ -266,7 +263,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(100.f, 100.f, 0.f));
replica->SetPosition(gfx::Point());
replica->SetTransform(replica_transform);
replica->SetMaskLayer(mask.get());
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_host_pixeltest_on_demand_raster.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698