summaryrefslogtreecommitdiffstats
path: root/cc/trees
diff options
context:
space:
mode:
authorchrishtr@chromium.org <chrishtr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-05 03:14:20 +0000
committerchrishtr@chromium.org <chrishtr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-05 03:14:20 +0000
commita25664116cf216f0946ea3f60837ec207effa291 (patch)
treea8cbc599562d72cfea33b4de13d95233d30fb4ed /cc/trees
parentdc8b94b23ca7993b4004cc82f66cadf37775c3c2 (diff)
downloadchromium_src-a25664116cf216f0946ea3f60837ec207effa291.zip
chromium_src-a25664116cf216f0946ea3f60837ec207effa291.tar.gz
chromium_src-a25664116cf216f0946ea3f60837ec207effa291.tar.bz2
Get rid of graphics layer anchor points, and replace with
transform origin. This is the cc side change that listens to transform origin instead of anchor point. Blink is already populating both fields. BUG=372837 Review URL: https://codereview.chromium.org/295193002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@274990 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/trees')
-rw-r--r--cc/trees/damage_tracker_unittest.cc41
-rw-r--r--cc/trees/layer_tree_host_common.cc32
-rw-r--r--cc/trees/layer_tree_host_common_unittest.cc687
-rw-r--r--cc/trees/layer_tree_host_impl_unittest.cc59
-rw-r--r--cc/trees/layer_tree_host_pixeltest_masks.cc11
-rw-r--r--cc/trees/layer_tree_host_pixeltest_on_demand_raster.cc1
-rw-r--r--cc/trees/layer_tree_host_pixeltest_readback.cc12
-rw-r--r--cc/trees/layer_tree_host_unittest.cc17
-rw-r--r--cc/trees/layer_tree_host_unittest_context.cc15
-rw-r--r--cc/trees/layer_tree_host_unittest_delegated.cc2
-rw-r--r--cc/trees/layer_tree_host_unittest_occlusion.cc2
-rw-r--r--cc/trees/layer_tree_host_unittest_scroll.cc3
-rw-r--r--cc/trees/layer_tree_host_unittest_video.cc2
-rw-r--r--cc/trees/layer_tree_impl_unittest.cc268
-rw-r--r--cc/trees/occlusion_tracker_unittest.cc1
15 files changed, 568 insertions, 585 deletions
diff --git a/cc/trees/damage_tracker_unittest.cc b/cc/trees/damage_tracker_unittest.cc
index d86b340..169eea4 100644
--- a/cc/trees/damage_tracker_unittest.cc
+++ b/cc/trees/damage_tracker_unittest.cc
@@ -23,15 +23,15 @@ namespace cc {
namespace {
void ExecuteCalculateDrawProperties(LayerImpl* root,
- LayerImplList& render_surface_layer_list) {
+ LayerImplList* render_surface_layer_list) {
// Sanity check: The test itself should create the root layer's render
// surface, so that the surface (and its damage tracker) can
// persist across multiple calls to this function.
ASSERT_TRUE(root->render_surface());
- ASSERT_FALSE(render_surface_layer_list.size());
+ ASSERT_FALSE(render_surface_layer_list->size());
LayerTreeHostCommon::CalcDrawPropsImplInputsForTesting inputs(
- root, root->bounds(), &render_surface_layer_list);
+ root, root->bounds(), render_surface_layer_list);
LayerTreeHostCommon::CalculateDrawProperties(&inputs);
}
@@ -52,7 +52,7 @@ void EmulateDrawingOneFrame(LayerImpl* root) {
// and surfaces.
LayerImplList render_surface_layer_list;
- ExecuteCalculateDrawProperties(root, render_surface_layer_list);
+ ExecuteCalculateDrawProperties(root, &render_surface_layer_list);
// Iterate back-to-front, so that damage correctly propagates from descendant
// surfaces to ancestors.
@@ -82,7 +82,6 @@ class DamageTrackerTest : public testing::Test {
LayerImpl::Create(host_impl_.active_tree(), 2);
root->SetPosition(gfx::PointF());
- root->SetAnchorPoint(gfx::PointF());
root->SetBounds(gfx::Size(500, 500));
root->SetContentBounds(gfx::Size(500, 500));
root->SetDrawsContent(true);
@@ -90,7 +89,6 @@ class DamageTrackerTest : public testing::Test {
root->render_surface()->SetContentRect(gfx::Rect(0, 0, 500, 500));
child->SetPosition(gfx::PointF(100.f, 100.f));
- child->SetAnchorPoint(gfx::PointF());
child->SetBounds(gfx::Size(30, 30));
child->SetContentBounds(gfx::Size(30, 30));
child->SetDrawsContent(true);
@@ -116,7 +114,6 @@ class DamageTrackerTest : public testing::Test {
LayerImpl::Create(host_impl_.active_tree(), 5);
root->SetPosition(gfx::PointF());
- root->SetAnchorPoint(gfx::PointF());
root->SetBounds(gfx::Size(500, 500));
root->SetContentBounds(gfx::Size(500, 500));
root->SetDrawsContent(true);
@@ -124,7 +121,6 @@ class DamageTrackerTest : public testing::Test {
root->render_surface()->SetContentRect(gfx::Rect(0, 0, 500, 500));
child1->SetPosition(gfx::PointF(100.f, 100.f));
- child1->SetAnchorPoint(gfx::PointF());
child1->SetBounds(gfx::Size(30, 30));
child1->SetContentBounds(gfx::Size(30, 30));
// With a child that draws_content, opacity will cause the layer to create
@@ -136,19 +132,16 @@ class DamageTrackerTest : public testing::Test {
child1->SetForceRenderSurface(true);
child2->SetPosition(gfx::PointF(11.f, 11.f));
- child2->SetAnchorPoint(gfx::PointF());
child2->SetBounds(gfx::Size(18, 18));
child2->SetContentBounds(gfx::Size(18, 18));
child2->SetDrawsContent(true);
grand_child1->SetPosition(gfx::PointF(200.f, 200.f));
- grand_child1->SetAnchorPoint(gfx::PointF());
grand_child1->SetBounds(gfx::Size(6, 8));
grand_child1->SetContentBounds(gfx::Size(6, 8));
grand_child1->SetDrawsContent(true);
grand_child2->SetPosition(gfx::PointF(190.f, 190.f));
- grand_child2->SetAnchorPoint(gfx::PointF());
grand_child2->SetBounds(gfx::Size(6, 8));
grand_child2->SetContentBounds(gfx::Size(6, 8));
grand_child2->SetDrawsContent(true);
@@ -419,7 +412,8 @@ TEST_F(DamageTrackerTest, VerifyDamageForTransformedLayer) {
rotation.Rotate(45.0);
ClearDamageForAllSurfaces(root.get());
- child->SetAnchorPoint(gfx::PointF(0.5f, 0.5f));
+ child->SetTransformOrigin(gfx::Point3F(
+ child->bounds().width() * 0.5f, child->bounds().height() * 0.5f, 0.f));
child->SetPosition(gfx::PointF(85.f, 85.f));
EmulateDrawingOneFrame(root.get());
@@ -709,7 +703,6 @@ TEST_F(DamageTrackerTest, VerifyDamageForAddingAndRemovingLayer) {
scoped_ptr<LayerImpl> child2 =
LayerImpl::Create(host_impl_.active_tree(), 3);
child2->SetPosition(gfx::PointF(400.f, 380.f));
- child2->SetAnchorPoint(gfx::PointF());
child2->SetBounds(gfx::Size(6, 8));
child2->SetContentBounds(gfx::Size(6, 8));
child2->SetDrawsContent(true);
@@ -759,7 +752,6 @@ TEST_F(DamageTrackerTest, VerifyDamageForNewUnchangedLayer) {
scoped_ptr<LayerImpl> child2 =
LayerImpl::Create(host_impl_.active_tree(), 3);
child2->SetPosition(gfx::PointF(400.f, 380.f));
- child2->SetAnchorPoint(gfx::PointF());
child2->SetBounds(gfx::Size(6, 8));
child2->SetContentBounds(gfx::Size(6, 8));
child2->SetDrawsContent(true);
@@ -793,7 +785,6 @@ TEST_F(DamageTrackerTest, VerifyDamageForMultipleLayers) {
scoped_ptr<LayerImpl> child2 =
LayerImpl::Create(host_impl_.active_tree(), 3);
child2->SetPosition(gfx::PointF(400.f, 380.f));
- child2->SetAnchorPoint(gfx::PointF());
child2->SetBounds(gfx::Size(6, 8));
child2->SetContentBounds(gfx::Size(6, 8));
child2->SetDrawsContent(true);
@@ -1045,7 +1036,6 @@ TEST_F(DamageTrackerTest, VerifyDamageForReplica) {
scoped_ptr<LayerImpl> grand_child3 =
LayerImpl::Create(host_impl_.active_tree(), 6);
grand_child3->SetPosition(gfx::PointF(240.f, 240.f));
- grand_child3->SetAnchorPoint(gfx::PointF());
grand_child3->SetBounds(gfx::Size(10, 10));
grand_child3->SetContentBounds(gfx::Size(10, 10));
grand_child3->SetDrawsContent(true);
@@ -1061,7 +1051,6 @@ TEST_F(DamageTrackerTest, VerifyDamageForReplica) {
scoped_ptr<LayerImpl> grand_child1_replica =
LayerImpl::Create(host_impl_.active_tree(), 7);
grand_child1_replica->SetPosition(gfx::PointF());
- grand_child1_replica->SetAnchorPoint(gfx::PointF());
gfx::Transform reflection;
reflection.Scale3d(-1.0, 1.0, 1.0);
grand_child1_replica->SetTransform(reflection);
@@ -1147,7 +1136,6 @@ TEST_F(DamageTrackerTest, VerifyDamageForMask) {
scoped_ptr<LayerImpl> mask_layer =
LayerImpl::Create(host_impl_.active_tree(), 3);
mask_layer->SetPosition(child->position());
- mask_layer->SetAnchorPoint(gfx::PointF());
mask_layer->SetBounds(child->bounds());
mask_layer->SetContentBounds(child->bounds());
child->SetMaskLayer(mask_layer.Pass());
@@ -1161,7 +1149,6 @@ TEST_F(DamageTrackerTest, VerifyDamageForMask) {
scoped_ptr<LayerImpl> grand_child =
LayerImpl::Create(host_impl_.active_tree(), 4);
grand_child->SetPosition(gfx::PointF(2.f, 2.f));
- grand_child->SetAnchorPoint(gfx::PointF());
grand_child->SetBounds(gfx::Size(2, 2));
grand_child->SetContentBounds(gfx::Size(2, 2));
grand_child->SetDrawsContent(true);
@@ -1241,7 +1228,6 @@ TEST_F(DamageTrackerTest, VerifyDamageForReplicaMask) {
scoped_ptr<LayerImpl> grand_child1_replica =
LayerImpl::Create(host_impl_.active_tree(), 6);
grand_child1_replica->SetPosition(gfx::PointF());
- grand_child1_replica->SetAnchorPoint(gfx::PointF());
gfx::Transform reflection;
reflection.Scale3d(-1.0, 1.0, 1.0);
grand_child1_replica->SetTransform(reflection);
@@ -1254,7 +1240,6 @@ TEST_F(DamageTrackerTest, VerifyDamageForReplicaMask) {
scoped_ptr<LayerImpl> replica_mask_layer =
LayerImpl::Create(host_impl_.active_tree(), 7);
replica_mask_layer->SetPosition(gfx::PointF());
- replica_mask_layer->SetAnchorPoint(gfx::PointF());
replica_mask_layer->SetBounds(grand_child1->bounds());
replica_mask_layer->SetContentBounds(grand_child1->bounds());
grand_child1_replica->SetMaskLayer(replica_mask_layer.Pass());
@@ -1297,7 +1282,7 @@ TEST_F(DamageTrackerTest, VerifyDamageForReplicaMask) {
EXPECT_EQ(gfx::Rect(194, 200, 6, 8).ToString(), child_damage_rect.ToString());
}
-TEST_F(DamageTrackerTest, VerifyDamageForReplicaMaskWithAnchor) {
+TEST_F(DamageTrackerTest, VerifyDamageForReplicaMaskWithTransformOrigin) {
scoped_ptr<LayerImpl> root = CreateAndSetUpTestTreeWithTwoSurfaces();
LayerImpl* child1 = root->children()[0];
LayerImpl* grand_child1 = child1->children()[0];
@@ -1306,9 +1291,11 @@ TEST_F(DamageTrackerTest, VerifyDamageForReplicaMaskWithAnchor) {
// replica_mask.
ClearDamageForAllSurfaces(root.get());
- // This is not actually the anchor point being tested, but by convention its
+ // This is not actually the transform origin point being tested, but by
+ // convention its
// expected to be the same as the replica's anchor point.
- grand_child1->SetAnchorPoint(gfx::PointF(1.f, 0.f));
+ grand_child1->SetTransformOrigin(
+ gfx::Point3F(grand_child1->bounds().width(), 0.f, 0.f));
{
scoped_ptr<LayerImpl> grand_child1_replica =
@@ -1316,7 +1303,8 @@ TEST_F(DamageTrackerTest, VerifyDamageForReplicaMaskWithAnchor) {
grand_child1_replica->SetPosition(gfx::PointF());
// This is the anchor being tested.
- grand_child1_replica->SetAnchorPoint(gfx::PointF(1.f, 0.f));
+ grand_child1_replica->SetTransformOrigin(
+ gfx::Point3F(grand_child1->bounds().width(), 0.f, 0.f));
gfx::Transform reflection;
reflection.Scale3d(-1.0, 1.0, 1.0);
grand_child1_replica->SetTransform(reflection);
@@ -1329,8 +1317,7 @@ TEST_F(DamageTrackerTest, VerifyDamageForReplicaMaskWithAnchor) {
scoped_ptr<LayerImpl> replica_mask_layer =
LayerImpl::Create(host_impl_.active_tree(), 7);
replica_mask_layer->SetPosition(gfx::PointF());
- // Note: this is not the anchor being tested.
- replica_mask_layer->SetAnchorPoint(gfx::PointF());
+ // Note: this is not the transform origin being tested.
replica_mask_layer->SetBounds(grand_child1->bounds());
replica_mask_layer->SetContentBounds(grand_child1->bounds());
grand_child1_replica->SetMaskLayer(replica_mask_layer.Pass());
diff --git a/cc/trees/layer_tree_host_common.cc b/cc/trees/layer_tree_host_common.cc
index 34f4553..2335f4e 100644
--- a/cc/trees/layer_tree_host_common.cc
+++ b/cc/trees/layer_tree_host_common.cc
@@ -1651,25 +1651,21 @@ static void CalculateDrawPropertiesInternal(
animating_transform_to_screen |=
layer->parent()->screen_space_transform_is_animating();
}
-
- gfx::Size bounds = layer->bounds();
- gfx::PointF anchor_point = layer->anchor_point();
+ gfx::Point3F transform_origin = layer->transform_origin();
gfx::Vector2dF scroll_offset = GetEffectiveTotalScrollOffset(layer);
gfx::PointF position = layer->position() - scroll_offset;
-
gfx::Transform combined_transform = data_from_ancestor.parent_matrix;
if (!layer->transform().IsIdentity()) {
- // LT = Tr[origin] * Tr[origin2anchor]
- combined_transform.Translate3d(
- position.x() + anchor_point.x() * bounds.width(),
- position.y() + anchor_point.y() * bounds.height(),
- layer->anchor_point_z());
- // LT = Tr[origin] * Tr[origin2anchor] * M[layer]
+ // LT = Tr[origin] * Tr[origin2transformOrigin]
+ combined_transform.Translate3d(position.x() + transform_origin.x(),
+ position.y() + transform_origin.y(),
+ transform_origin.z());
+ // LT = Tr[origin] * Tr[origin2origin] * M[layer]
combined_transform.PreconcatTransform(layer->transform());
- // LT = Tr[origin] * Tr[origin2anchor] * M[layer] * Tr[anchor2origin]
- combined_transform.Translate3d(-anchor_point.x() * bounds.width(),
- -anchor_point.y() * bounds.height(),
- -layer->anchor_point_z());
+ // LT = Tr[origin] * Tr[origin2origin] * M[layer] *
+ // Tr[transformOrigin2origin]
+ combined_transform.Translate3d(
+ -transform_origin.x(), -transform_origin.y(), -transform_origin.z());
} else {
combined_transform.Translate(position.x(), position.y());
}
@@ -2250,14 +2246,14 @@ static void CalculateDrawPropertiesInternal(
render_surface_sublayer_scale.x(), render_surface_sublayer_scale.y());
surface_origin_to_replica_origin_transform.Translate(
layer->replica_layer()->position().x() +
- layer->replica_layer()->anchor_point().x() * bounds.width(),
+ layer->replica_layer()->transform_origin().x(),
layer->replica_layer()->position().y() +
- layer->replica_layer()->anchor_point().y() * bounds.height());
+ layer->replica_layer()->transform_origin().y());
surface_origin_to_replica_origin_transform.PreconcatTransform(
layer->replica_layer()->transform());
surface_origin_to_replica_origin_transform.Translate(
- -layer->replica_layer()->anchor_point().x() * bounds.width(),
- -layer->replica_layer()->anchor_point().y() * bounds.height());
+ -layer->replica_layer()->transform_origin().x(),
+ -layer->replica_layer()->transform_origin().y());
surface_origin_to_replica_origin_transform.Scale(
1.0 / render_surface_sublayer_scale.x(),
1.0 / render_surface_sublayer_scale.y());
diff --git a/cc/trees/layer_tree_host_common_unittest.cc b/cc/trees/layer_tree_host_common_unittest.cc
index 43d94da..1c85081 100644
--- a/cc/trees/layer_tree_host_common_unittest.cc
+++ b/cc/trees/layer_tree_host_common_unittest.cc
@@ -125,21 +125,21 @@ TEST_F(LayerTreeHostCommonTest, TransformsForNoOpLayer) {
gfx::Transform identity_matrix;
SetLayerPropertiesForTesting(parent.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
false);
SetLayerPropertiesForTesting(child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(),
true,
false);
SetLayerPropertiesForTesting(grand_child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(),
true,
@@ -163,7 +163,7 @@ TEST_F(LayerTreeHostCommonTest, TransformsForSingleLayer) {
scoped_refptr<Layer> root = Layer::Create();
SetLayerPropertiesForTesting(root.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(1, 2),
true,
@@ -179,7 +179,7 @@ TEST_F(LayerTreeHostCommonTest, TransformsForSingleLayer) {
translation_to_center.Translate(5.0, 6.0);
SetLayerPropertiesForTesting(layer.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(10, 12),
true,
@@ -193,7 +193,7 @@ TEST_F(LayerTreeHostCommonTest, TransformsForSingleLayer) {
// no effect on the transforms.
SetLayerPropertiesForTesting(layer.get(),
identity_matrix,
- gfx::PointF(0.25f, 0.25f),
+ gfx::Point3F(2.5f, 3.0f, 0.f),
gfx::PointF(),
gfx::Size(10, 12),
true,
@@ -209,7 +209,7 @@ TEST_F(LayerTreeHostCommonTest, TransformsForSingleLayer) {
position_transform.Translate(0.f, 1.2f);
SetLayerPropertiesForTesting(layer.get(),
identity_matrix,
- gfx::PointF(0.25f, 0.25f),
+ gfx::Point3F(2.5f, 3.0f, 0.f),
gfx::PointF(0.f, 1.2f),
gfx::Size(10, 12),
true,
@@ -226,7 +226,7 @@ TEST_F(LayerTreeHostCommonTest, TransformsForSingleLayer) {
layer_transform.Scale3d(2.0, 2.0, 1.0);
SetLayerPropertiesForTesting(layer.get(),
layer_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(10, 12),
true,
@@ -243,7 +243,7 @@ TEST_F(LayerTreeHostCommonTest, TransformsForSingleLayer) {
translation_to_anchor * layer_transform * Inverse(translation_to_anchor);
SetLayerPropertiesForTesting(layer.get(),
layer_transform,
- gfx::PointF(0.5f, 0.f),
+ gfx::Point3F(5.0f, 0.f, 0.f),
gfx::PointF(),
gfx::Size(10, 12),
true,
@@ -260,7 +260,7 @@ TEST_F(LayerTreeHostCommonTest, TransformsForSingleLayer) {
layer_transform * Inverse(translation_to_anchor);
SetLayerPropertiesForTesting(layer.get(),
layer_transform,
- gfx::PointF(0.5f, 0.f),
+ gfx::Point3F(5.0f, 0.f, 0.f),
gfx::PointF(0.f, 1.2f),
gfx::Size(10, 12),
true,
@@ -292,7 +292,7 @@ TEST_F(LayerTreeHostCommonTest, TransformsAboutScrollOffset) {
kPageScale * kDeviceScale);
SetLayerPropertiesForTesting(sublayer,
identity_matrix,
- gfx::Point(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(500, 500),
true,
@@ -303,7 +303,7 @@ TEST_F(LayerTreeHostCommonTest, TransformsAboutScrollOffset) {
LayerImpl* scroll_layer = scroll_layer_scoped_ptr.get();
SetLayerPropertiesForTesting(scroll_layer,
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(10, 20),
true,
@@ -327,7 +327,7 @@ TEST_F(LayerTreeHostCommonTest, TransformsAboutScrollOffset) {
scoped_ptr<LayerImpl> root(LayerImpl::Create(host_impl.active_tree(), 3));
SetLayerPropertiesForTesting(root.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(3, 4),
true,
@@ -352,7 +352,7 @@ TEST_F(LayerTreeHostCommonTest, TransformsAboutScrollOffset) {
arbitrary_translate.Translate(kTranslateX, kTranslateY);
SetLayerPropertiesForTesting(scroll_layer,
arbitrary_translate,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(10, 20),
true,
@@ -385,7 +385,7 @@ TEST_F(LayerTreeHostCommonTest, TransformsForSimpleHierarchy) {
// One-time setup of root layer
SetLayerPropertiesForTesting(root.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(1, 2),
true,
@@ -394,21 +394,21 @@ TEST_F(LayerTreeHostCommonTest, TransformsForSimpleHierarchy) {
// Case 1: parent's anchor point should not affect child or grand_child.
SetLayerPropertiesForTesting(parent.get(),
identity_matrix,
- gfx::PointF(0.25f, 0.25f),
+ gfx::Point3F(2.5f, 3.0f, 0.f),
gfx::PointF(),
gfx::Size(10, 12),
true,
false);
SetLayerPropertiesForTesting(child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(16, 18),
true,
false);
SetLayerPropertiesForTesting(grand_child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(76, 78),
true,
@@ -427,21 +427,21 @@ TEST_F(LayerTreeHostCommonTest, TransformsForSimpleHierarchy) {
parent_position_transform.Translate(0.f, 1.2f);
SetLayerPropertiesForTesting(parent.get(),
identity_matrix,
- gfx::PointF(0.25f, 0.25f),
+ gfx::Point3F(2.5f, 3.0f, 0.f),
gfx::PointF(0.f, 1.2f),
gfx::Size(10, 12),
true,
false);
SetLayerPropertiesForTesting(child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(16, 18),
true,
false);
SetLayerPropertiesForTesting(grand_child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(76, 78),
true,
@@ -466,21 +466,21 @@ TEST_F(LayerTreeHostCommonTest, TransformsForSimpleHierarchy) {
Inverse(parent_translation_to_anchor);
SetLayerPropertiesForTesting(parent.get(),
parent_layer_transform,
- gfx::PointF(0.25f, 0.25f),
+ gfx::Point3F(2.5f, 3.0f, 0.f),
gfx::PointF(),
gfx::Size(10, 12),
true,
false);
SetLayerPropertiesForTesting(child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(16, 18),
true,
false);
SetLayerPropertiesForTesting(grand_child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(76, 78),
true,
@@ -513,7 +513,7 @@ TEST_F(LayerTreeHostCommonTest, TransformsForSingleRenderSurface) {
gfx::Transform identity_matrix;
SetLayerPropertiesForTesting(root.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(1, 2),
true,
@@ -545,21 +545,21 @@ TEST_F(LayerTreeHostCommonTest, TransformsForSingleRenderSurface) {
SetLayerPropertiesForTesting(parent.get(),
parent_layer_transform,
- gfx::PointF(0.25f, 0.25f),
+ gfx::Point3F(25.0f, 30.0f, 0.f),
gfx::PointF(),
gfx::Size(100, 120),
true,
false);
SetLayerPropertiesForTesting(child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(16, 18),
true,
false);
SetLayerPropertiesForTesting(grand_child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(8, 10),
true,
@@ -610,7 +610,7 @@ TEST_F(LayerTreeHostCommonTest, TransformsForReplica) {
gfx::Transform identity_matrix;
SetLayerPropertiesForTesting(root.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(1, 2),
true,
@@ -643,28 +643,28 @@ TEST_F(LayerTreeHostCommonTest, TransformsForReplica) {
SetLayerPropertiesForTesting(parent.get(),
parent_layer_transform,
- gfx::PointF(0.25f, 0.25f),
+ gfx::Point3F(2.5f, 3.0f, 0.f),
gfx::PointF(),
gfx::Size(10, 12),
true,
false);
SetLayerPropertiesForTesting(child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(16, 18),
true,
false);
SetLayerPropertiesForTesting(grand_child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(-0.5f, -0.5f),
gfx::Size(1, 1),
true,
false);
SetLayerPropertiesForTesting(child_replica.get(),
replica_layer_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(),
true,
@@ -736,7 +736,7 @@ TEST_F(LayerTreeHostCommonTest, TransformsForRenderSurfaceHierarchy) {
gfx::Transform identity_matrix;
SetLayerPropertiesForTesting(root.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(1, 2),
true,
@@ -783,77 +783,77 @@ TEST_F(LayerTreeHostCommonTest, TransformsForRenderSurfaceHierarchy) {
SetLayerPropertiesForTesting(parent.get(),
layer_transform,
- gfx::PointF(0.25f, 0.f),
+ gfx::Point3F(2.5f, 0.f, 0.f),
gfx::PointF(),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(render_surface1.get(),
layer_transform,
- gfx::PointF(0.25f, 0.f),
+ gfx::Point3F(2.5f, 0.f, 0.f),
gfx::PointF(),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(render_surface2.get(),
layer_transform,
- gfx::PointF(0.25f, 0.f),
+ gfx::Point3F(2.5f, 0.f, 0.f),
gfx::PointF(),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(child_of_root.get(),
layer_transform,
- gfx::PointF(0.25f, 0.f),
+ gfx::Point3F(2.5f, 0.f, 0.f),
gfx::PointF(),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(child_of_rs1.get(),
layer_transform,
- gfx::PointF(0.25f, 0.f),
+ gfx::Point3F(2.5f, 0.f, 0.f),
gfx::PointF(),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(child_of_rs2.get(),
layer_transform,
- gfx::PointF(0.25f, 0.f),
+ gfx::Point3F(2.5f, 0.f, 0.f),
gfx::PointF(),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(grand_child_of_root.get(),
layer_transform,
- gfx::PointF(0.25f, 0.f),
+ gfx::Point3F(2.5f, 0.f, 0.f),
gfx::PointF(),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(grand_child_of_rs1.get(),
layer_transform,
- gfx::PointF(0.25f, 0.f),
+ gfx::Point3F(2.5f, 0.f, 0.f),
gfx::PointF(),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(grand_child_of_rs2.get(),
layer_transform,
- gfx::PointF(0.25f, 0.f),
+ gfx::Point3F(2.5f, 0.f, 0.f),
gfx::PointF(),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(replica_of_rs1.get(),
replica_layer_transform,
- gfx::PointF(0.25f, 0.f),
+ gfx::Point3F(2.5f, 0.f, 0.f),
gfx::PointF(),
gfx::Size(),
true,
false);
SetLayerPropertiesForTesting(replica_of_rs2.get(),
replica_layer_transform,
- gfx::PointF(0.25f, 0.f),
+ gfx::Point3F(2.5f, 0.f, 0.f),
gfx::PointF(),
gfx::Size(),
true,
@@ -995,21 +995,21 @@ TEST_F(LayerTreeHostCommonTest, TransformsForFlatteningLayer) {
const gfx::Transform identity_matrix;
SetLayerPropertiesForTesting(root.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
false);
SetLayerPropertiesForTesting(child.get(),
rotation_about_y_axis,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(grand_child.get(),
rotation_about_y_axis,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(10, 10),
true,
@@ -1074,21 +1074,21 @@ TEST_F(LayerTreeHostCommonTest, TransformsForDegenerateIntermediateLayer) {
const gfx::Transform identity_matrix;
SetLayerPropertiesForTesting(root.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
false);
SetLayerPropertiesForTesting(child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(10, 0),
true,
false);
SetLayerPropertiesForTesting(grand_child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(10, 10),
true,
@@ -1128,14 +1128,14 @@ TEST_F(LayerTreeHostCommonTest, TransformAboveRootLayer) {
SetLayerPropertiesForTesting(root.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(20, 20),
true,
false);
SetLayerPropertiesForTesting(child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(20, 20),
true,
@@ -1275,21 +1275,21 @@ TEST_F(LayerTreeHostCommonTest,
const gfx::Transform identity_matrix;
SetLayerPropertiesForTesting(parent.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(render_surface1.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(30.f, 30.f),
gfx::Size(10, 10),
true,
@@ -1329,14 +1329,14 @@ TEST_F(LayerTreeHostCommonTest, RenderSurfaceListForTransparentChild) {
const gfx::Transform identity_matrix;
SetLayerPropertiesForTesting(render_surface1.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(10, 10),
true,
@@ -1376,21 +1376,21 @@ TEST_F(LayerTreeHostCommonTest, ForceRenderSurface) {
const gfx::Transform identity_matrix;
SetLayerPropertiesForTesting(parent.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(render_surface1.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(10, 10),
true,
@@ -1470,42 +1470,42 @@ TEST_F(LayerTreeHostCommonTest, ClipRectCullsRenderSurfaces) {
SetLayerPropertiesForTesting(parent.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(500, 500),
true,
false);
SetLayerPropertiesForTesting(child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(20, 20),
true,
false);
SetLayerPropertiesForTesting(grand_child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(45.f, 45.f),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(great_grand_child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(leaf_node1.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(500, 500),
true,
false);
SetLayerPropertiesForTesting(leaf_node2.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(20, 20),
true,
@@ -1562,28 +1562,28 @@ TEST_F(LayerTreeHostCommonTest, ClipRectCullsSurfaceWithoutVisibleContent) {
SetLayerPropertiesForTesting(parent.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
false);
SetLayerPropertiesForTesting(child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(20, 20),
true,
false);
SetLayerPropertiesForTesting(grand_child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(200.f, 200.f),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(leaf_node.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(10, 10),
true,
@@ -1666,49 +1666,49 @@ TEST_F(LayerTreeHostCommonTest, IsClippedIsSetCorrectly) {
SetLayerPropertiesForTesting(root.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
false);
SetLayerPropertiesForTesting(parent.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
false);
SetLayerPropertiesForTesting(child1.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
false);
SetLayerPropertiesForTesting(child2.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
false);
SetLayerPropertiesForTesting(grand_child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
false);
SetLayerPropertiesForTesting(leaf_node1.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
false);
SetLayerPropertiesForTesting(leaf_node2.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
@@ -1822,42 +1822,42 @@ TEST_F(LayerTreeHostCommonTest, DrawableContentRectForLayers) {
SetLayerPropertiesForTesting(parent.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(500, 500),
true,
false);
SetLayerPropertiesForTesting(child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(20, 20),
true,
false);
SetLayerPropertiesForTesting(grand_child1.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(5.f, 5.f),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(grand_child2.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(15.f, 15.f),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(grand_child3.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(15.f, 15.f),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(grand_child4.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(45.f, 45.f),
gfx::Size(10, 10),
true,
@@ -1930,70 +1930,70 @@ TEST_F(LayerTreeHostCommonTest, ClipRectIsPropagatedCorrectlyToSurfaces) {
SetLayerPropertiesForTesting(parent.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(500, 500),
true,
false);
SetLayerPropertiesForTesting(child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(20, 20),
true,
false);
SetLayerPropertiesForTesting(grand_child1.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(5.f, 5.f),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(grand_child2.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(15.f, 15.f),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(grand_child3.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(15.f, 15.f),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(grand_child4.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(45.f, 45.f),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(leaf_node1.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(leaf_node2.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(leaf_node3.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(leaf_node4.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(10, 10),
true,
@@ -2067,63 +2067,63 @@ TEST_F(LayerTreeHostCommonTest, AnimationsForRenderSurfaceHierarchy) {
SetLayerPropertiesForTesting(parent.get(),
layer_transform,
- gfx::PointF(0.25f, 0.f),
+ gfx::Point3F(0.25f, 0.f, 0.f),
gfx::PointF(2.5f, 0.f),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(render_surface1.get(),
layer_transform,
- gfx::PointF(0.25f, 0.f),
+ gfx::Point3F(0.25f, 0.f, 0.f),
gfx::PointF(2.5f, 0.f),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(render_surface2.get(),
layer_transform,
- gfx::PointF(0.25f, 0.f),
+ gfx::Point3F(0.25f, 0.f, 0.f),
gfx::PointF(2.5f, 0.f),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(child_of_root.get(),
layer_transform,
- gfx::PointF(0.25f, 0.f),
+ gfx::Point3F(0.25f, 0.f, 0.f),
gfx::PointF(2.5f, 0.f),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(child_of_rs1.get(),
layer_transform,
- gfx::PointF(0.25f, 0.f),
+ gfx::Point3F(0.25f, 0.f, 0.f),
gfx::PointF(2.5f, 0.f),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(child_of_rs2.get(),
layer_transform,
- gfx::PointF(0.25f, 0.f),
+ gfx::Point3F(0.25f, 0.f, 0.f),
gfx::PointF(2.5f, 0.f),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(grand_child_of_root.get(),
layer_transform,
- gfx::PointF(0.25f, 0.f),
+ gfx::Point3F(0.25f, 0.f, 0.f),
gfx::PointF(2.5f, 0.f),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(grand_child_of_rs1.get(),
layer_transform,
- gfx::PointF(0.25f, 0.f),
+ gfx::Point3F(0.25f, 0.f, 0.f),
gfx::PointF(2.5f, 0.f),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(grand_child_of_rs2.get(),
layer_transform,
- gfx::PointF(0.25f, 0.f),
+ gfx::Point3F(0.25f, 0.f, 0.f),
gfx::PointF(2.5f, 0.f),
gfx::Size(10, 10),
true,
@@ -2549,28 +2549,28 @@ TEST_F(LayerTreeHostCommonTest, DrawableAndVisibleContentRectsForSimpleLayers) {
gfx::Transform identity_matrix;
SetLayerPropertiesForTesting(root.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
false);
SetLayerPropertiesForTesting(child1.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(50, 50),
true,
false);
SetLayerPropertiesForTesting(child2.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(75.f, 75.f),
gfx::Size(50, 50),
true,
false);
SetLayerPropertiesForTesting(child3.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(125.f, 125.f),
gfx::Size(50, 50),
true,
@@ -2617,35 +2617,35 @@ TEST_F(LayerTreeHostCommonTest,
gfx::Transform identity_matrix;
SetLayerPropertiesForTesting(root.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
false);
SetLayerPropertiesForTesting(child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
false);
SetLayerPropertiesForTesting(grand_child1.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(5.f, 5.f),
gfx::Size(50, 50),
true,
false);
SetLayerPropertiesForTesting(grand_child2.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(75.f, 75.f),
gfx::Size(50, 50),
true,
false);
SetLayerPropertiesForTesting(grand_child3.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(125.f, 125.f),
gfx::Size(50, 50),
true,
@@ -2698,35 +2698,35 @@ TEST_F(LayerTreeHostCommonTest,
gfx::Transform identity_matrix;
SetLayerPropertiesForTesting(root.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
false);
SetLayerPropertiesForTesting(render_surface1.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(3, 4),
true,
false);
SetLayerPropertiesForTesting(child1.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(5.f, 5.f),
gfx::Size(50, 50),
true,
false);
SetLayerPropertiesForTesting(child2.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(75.f, 75.f),
gfx::Size(50, 50),
true,
false);
SetLayerPropertiesForTesting(child3.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(125.f, 125.f),
gfx::Size(50, 50),
true,
@@ -2778,14 +2778,14 @@ TEST_F(LayerTreeHostCommonTest,
SetLayerPropertiesForTesting(root.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
false);
SetLayerPropertiesForTesting(child.get(),
uninvertible_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(5.f, 5.f),
gfx::Size(50, 50),
true,
@@ -2804,7 +2804,7 @@ TEST_F(LayerTreeHostCommonTest,
SetLayerPropertiesForTesting(child.get(),
uninvertible_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(5.f, 5.f),
gfx::Size(50, 50),
true,
@@ -2823,7 +2823,7 @@ TEST_F(LayerTreeHostCommonTest,
SetLayerPropertiesForTesting(child.get(),
uninvertible_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(5.f, 5.f),
gfx::Size(50, 50),
true,
@@ -2851,14 +2851,14 @@ TEST_F(LayerTreeHostCommonTest,
SetLayerPropertiesForTesting(root.get(),
uninvertible_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
false);
SetLayerPropertiesForTesting(child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(5.f, 5.f),
gfx::Size(50, 50),
true,
@@ -2895,7 +2895,7 @@ TEST_F(LayerTreeHostCommonTest,
SetLayerPropertiesForTesting(root.get(),
uninvertible_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
@@ -2931,35 +2931,35 @@ TEST_F(LayerTreeHostCommonTest,
gfx::Transform identity_matrix;
SetLayerPropertiesForTesting(root.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
false);
SetLayerPropertiesForTesting(render_surface1.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(3, 4),
true,
false);
SetLayerPropertiesForTesting(child1.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(5.f, 5.f),
gfx::Size(50, 50),
true,
false);
SetLayerPropertiesForTesting(child2.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(75.f, 75.f),
gfx::Size(50, 50),
true,
false);
SetLayerPropertiesForTesting(child3.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(125.f, 125.f),
gfx::Size(50, 50),
true,
@@ -3021,42 +3021,42 @@ TEST_F(LayerTreeHostCommonTest,
gfx::Transform identity_matrix;
SetLayerPropertiesForTesting(root.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
false);
SetLayerPropertiesForTesting(render_surface1.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(3, 4),
true,
false);
SetLayerPropertiesForTesting(render_surface2.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(7, 13),
true,
false);
SetLayerPropertiesForTesting(child1.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(5.f, 5.f),
gfx::Size(50, 50),
true,
false);
SetLayerPropertiesForTesting(child2.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(75.f, 75.f),
gfx::Size(50, 50),
true,
false);
SetLayerPropertiesForTesting(child3.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(125.f, 125.f),
gfx::Size(50, 50),
true,
@@ -3123,21 +3123,21 @@ TEST_F(LayerTreeHostCommonTest,
child_rotation.Rotate(45.0);
SetLayerPropertiesForTesting(root.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
false);
SetLayerPropertiesForTesting(render_surface1.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(3, 4),
true,
false);
SetLayerPropertiesForTesting(child1.get(),
child_rotation,
- gfx::PointF(0.5f, 0.5f),
+ gfx::Point3F(25, 25, 0.f),
gfx::PointF(25.f, 25.f),
gfx::Size(50, 50),
true,
@@ -3194,21 +3194,22 @@ TEST_F(LayerTreeHostCommonTest,
child_rotation.Rotate(45.0);
SetLayerPropertiesForTesting(root.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(50, 50),
true,
false);
SetLayerPropertiesForTesting(render_surface1.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(3, 4),
true,
false);
+
SetLayerPropertiesForTesting(child1.get(),
child_rotation,
- gfx::PointF(0.5f, 0.5f),
+ gfx::Point3F(25, 25, 0.f),
gfx::PointF(25.f, 25.f),
gfx::Size(50, 50),
true,
@@ -3266,42 +3267,42 @@ TEST_F(LayerTreeHostCommonTest, DrawableAndVisibleContentRectsInHighDPI) {
gfx::Transform identity_matrix;
SetLayerPropertiesForTesting(root.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
false);
SetLayerPropertiesForTesting(render_surface1.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(5.f, 5.f),
gfx::Size(3, 4),
true,
false);
SetLayerPropertiesForTesting(render_surface2.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(5.f, 5.f),
gfx::Size(7, 13),
true,
false);
SetLayerPropertiesForTesting(child1.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(5.f, 5.f),
gfx::Size(50, 50),
true,
false);
SetLayerPropertiesForTesting(child2.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(75.f, 75.f),
gfx::Size(50, 50),
true,
false);
SetLayerPropertiesForTesting(child3.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(125.f, 125.f),
gfx::Size(50, 50),
true,
@@ -3414,63 +3415,63 @@ TEST_F(LayerTreeHostCommonTest, BackFaceCullingWithoutPreserves3d) {
// back-face culling.
SetLayerPropertiesForTesting(parent.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
false);
SetLayerPropertiesForTesting(front_facing_child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
false);
SetLayerPropertiesForTesting(back_facing_child.get(),
backface_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
false);
SetLayerPropertiesForTesting(front_facing_surface.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
false);
SetLayerPropertiesForTesting(back_facing_surface.get(),
backface_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
false);
SetLayerPropertiesForTesting(front_facing_child_of_front_facing_surface.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
false);
SetLayerPropertiesForTesting(back_facing_child_of_front_facing_surface.get(),
backface_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
false);
SetLayerPropertiesForTesting(front_facing_child_of_back_facing_surface.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
false);
SetLayerPropertiesForTesting(back_facing_child_of_back_facing_surface.get(),
backface_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
@@ -3624,21 +3625,21 @@ TEST_F(LayerTreeHostCommonTest, BackFaceCullingWithPreserves3d) {
// and (b) the layer's transform style is preserve-3d.
SetLayerPropertiesForTesting(parent.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
false); // parent transform style is flat.
SetLayerPropertiesForTesting(front_facing_child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
false);
SetLayerPropertiesForTesting(back_facing_child.get(),
backface_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
@@ -3646,7 +3647,7 @@ TEST_F(LayerTreeHostCommonTest, BackFaceCullingWithPreserves3d) {
// surface transform style is preserve-3d.
SetLayerPropertiesForTesting(front_facing_surface.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
false,
@@ -3654,35 +3655,35 @@ TEST_F(LayerTreeHostCommonTest, BackFaceCullingWithPreserves3d) {
// surface transform style is preserve-3d.
SetLayerPropertiesForTesting(back_facing_surface.get(),
backface_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
false,
true);
SetLayerPropertiesForTesting(front_facing_child_of_front_facing_surface.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
true);
SetLayerPropertiesForTesting(back_facing_child_of_front_facing_surface.get(),
backface_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
true);
SetLayerPropertiesForTesting(front_facing_child_of_back_facing_surface.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
true);
SetLayerPropertiesForTesting(back_facing_child_of_back_facing_surface.get(),
backface_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
@@ -3786,42 +3787,42 @@ TEST_F(LayerTreeHostCommonTest, BackFaceCullingWithAnimatingTransforms) {
SetLayerPropertiesForTesting(parent.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
false);
SetLayerPropertiesForTesting(child.get(),
backface_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
false);
SetLayerPropertiesForTesting(animating_surface.get(),
backface_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
false);
SetLayerPropertiesForTesting(child_of_animating_surface.get(),
backface_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
false);
SetLayerPropertiesForTesting(animating_child.get(),
backface_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
false);
SetLayerPropertiesForTesting(child2.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
@@ -3919,35 +3920,35 @@ TEST_F(LayerTreeHostCommonTest,
SetLayerPropertiesForTesting(parent.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
false,
true); // parent transform style is preserve3d.
SetLayerPropertiesForTesting(front_facing_surface.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
true); // surface transform style is flat.
SetLayerPropertiesForTesting(back_facing_surface.get(),
backface_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
true); // surface transform style is flat.
SetLayerPropertiesForTesting(child1.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
false);
SetLayerPropertiesForTesting(child2.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
@@ -4042,7 +4043,7 @@ TEST_F(LayerTreeHostCommonTest, LayerTransformsInHighDPI) {
scoped_refptr<ContentLayer> parent = CreateDrawableContentLayer(&delegate);
SetLayerPropertiesForTesting(parent.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
false,
@@ -4051,7 +4052,7 @@ TEST_F(LayerTreeHostCommonTest, LayerTransformsInHighDPI) {
scoped_refptr<ContentLayer> child = CreateDrawableContentLayer(&delegate);
SetLayerPropertiesForTesting(child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(2.f, 2.f),
gfx::Size(10, 10),
false,
@@ -4061,7 +4062,7 @@ TEST_F(LayerTreeHostCommonTest, LayerTransformsInHighDPI) {
CreateDrawableContentLayer(&delegate);
SetLayerPropertiesForTesting(child_empty.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(2.f, 2.f),
gfx::Size(),
false,
@@ -4071,7 +4072,7 @@ TEST_F(LayerTreeHostCommonTest, LayerTransformsInHighDPI) {
CreateNoScaleDrawableContentLayer(&delegate);
SetLayerPropertiesForTesting(child_no_scale.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(2.f, 2.f),
gfx::Size(10, 10),
false,
@@ -4186,7 +4187,7 @@ TEST_F(LayerTreeHostCommonTest, SurfaceLayerTransformsInHighDPI) {
scoped_refptr<ContentLayer> parent = CreateDrawableContentLayer(&delegate);
SetLayerPropertiesForTesting(parent.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
false,
@@ -4196,7 +4197,7 @@ TEST_F(LayerTreeHostCommonTest, SurfaceLayerTransformsInHighDPI) {
CreateDrawableContentLayer(&delegate);
SetLayerPropertiesForTesting(perspective_surface.get(),
perspective_matrix * scale_small_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(2.f, 2.f),
gfx::Size(10, 10),
false,
@@ -4206,7 +4207,7 @@ TEST_F(LayerTreeHostCommonTest, SurfaceLayerTransformsInHighDPI) {
CreateDrawableContentLayer(&delegate);
SetLayerPropertiesForTesting(scale_surface.get(),
scale_small_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(2.f, 2.f),
gfx::Size(10, 10),
false,
@@ -4290,7 +4291,7 @@ TEST_F(LayerTreeHostCommonTest,
scoped_refptr<ContentLayer> parent = CreateDrawableContentLayer(&delegate);
SetLayerPropertiesForTesting(parent.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(133, 133),
false,
@@ -4299,7 +4300,7 @@ TEST_F(LayerTreeHostCommonTest,
scoped_refptr<ContentLayer> child = CreateDrawableContentLayer(&delegate);
SetLayerPropertiesForTesting(child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(13, 13),
false,
@@ -4309,7 +4310,7 @@ TEST_F(LayerTreeHostCommonTest,
CreateNoScaleDrawableContentLayer(&delegate);
SetLayerPropertiesForTesting(child_no_scale.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(13, 13),
false,
@@ -4414,7 +4415,7 @@ TEST_F(LayerTreeHostCommonTest, ContentsScale) {
scoped_refptr<ContentLayer> parent = CreateDrawableContentLayer(&delegate);
SetLayerPropertiesForTesting(parent.get(),
parent_scale_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
false,
@@ -4424,7 +4425,7 @@ TEST_F(LayerTreeHostCommonTest, ContentsScale) {
CreateDrawableContentLayer(&delegate);
SetLayerPropertiesForTesting(child_scale.get(),
child_scale_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(2.f, 2.f),
gfx::Size(10, 10),
false,
@@ -4434,7 +4435,7 @@ TEST_F(LayerTreeHostCommonTest, ContentsScale) {
CreateDrawableContentLayer(&delegate);
SetLayerPropertiesForTesting(child_empty.get(),
child_scale_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(2.f, 2.f),
gfx::Size(),
false,
@@ -4444,7 +4445,7 @@ TEST_F(LayerTreeHostCommonTest, ContentsScale) {
CreateNoScaleDrawableContentLayer(&delegate);
SetLayerPropertiesForTesting(child_no_scale.get(),
child_scale_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(12.f, 12.f),
gfx::Size(10, 10),
false,
@@ -4598,7 +4599,7 @@ TEST_F(LayerTreeHostCommonTest,
scoped_refptr<ContentLayer> parent = CreateDrawableContentLayer(&delegate);
SetLayerPropertiesForTesting(parent.get(),
parent_scale_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
false,
@@ -4608,7 +4609,7 @@ TEST_F(LayerTreeHostCommonTest,
CreateDrawableContentLayer(&delegate);
SetLayerPropertiesForTesting(child_scale.get(),
child_scale_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(2.f, 2.f),
gfx::Size(10, 10),
false,
@@ -4618,7 +4619,7 @@ TEST_F(LayerTreeHostCommonTest,
CreateDrawableContentLayer(&delegate);
SetLayerPropertiesForTesting(child_empty.get(),
child_scale_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(2.f, 2.f),
gfx::Size(),
false,
@@ -4628,7 +4629,7 @@ TEST_F(LayerTreeHostCommonTest,
CreateNoScaleDrawableContentLayer(&delegate);
SetLayerPropertiesForTesting(child_no_scale.get(),
child_scale_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(12.f, 12.f),
gfx::Size(10, 10),
false,
@@ -4702,7 +4703,7 @@ TEST_F(LayerTreeHostCommonTest, SmallContentsScale) {
scoped_refptr<ContentLayer> parent = CreateDrawableContentLayer(&delegate);
SetLayerPropertiesForTesting(parent.get(),
parent_scale_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
false,
@@ -4712,7 +4713,7 @@ TEST_F(LayerTreeHostCommonTest, SmallContentsScale) {
CreateDrawableContentLayer(&delegate);
SetLayerPropertiesForTesting(child_scale.get(),
child_scale_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(2.f, 2.f),
gfx::Size(10, 10),
false,
@@ -4791,7 +4792,7 @@ TEST_F(LayerTreeHostCommonTest, ContentsScaleForSurfaces) {
scoped_refptr<ContentLayer> parent = CreateDrawableContentLayer(&delegate);
SetLayerPropertiesForTesting(parent.get(),
parent_scale_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
false,
@@ -4801,7 +4802,7 @@ TEST_F(LayerTreeHostCommonTest, ContentsScaleForSurfaces) {
CreateDrawableContentLayer(&delegate);
SetLayerPropertiesForTesting(surface_scale.get(),
child_scale_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(2.f, 2.f),
gfx::Size(10, 10),
false,
@@ -4811,7 +4812,7 @@ TEST_F(LayerTreeHostCommonTest, ContentsScaleForSurfaces) {
CreateDrawableContentLayer(&delegate);
SetLayerPropertiesForTesting(surface_scale_child_scale.get(),
child_scale_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(10, 10),
false,
@@ -4821,7 +4822,7 @@ TEST_F(LayerTreeHostCommonTest, ContentsScaleForSurfaces) {
CreateNoScaleDrawableContentLayer(&delegate);
SetLayerPropertiesForTesting(surface_scale_child_no_scale.get(),
child_scale_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(10, 10),
false,
@@ -4831,7 +4832,7 @@ TEST_F(LayerTreeHostCommonTest, ContentsScaleForSurfaces) {
CreateNoScaleDrawableContentLayer(&delegate);
SetLayerPropertiesForTesting(surface_no_scale.get(),
child_scale_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(12.f, 12.f),
gfx::Size(10, 10),
false,
@@ -4841,7 +4842,7 @@ TEST_F(LayerTreeHostCommonTest, ContentsScaleForSurfaces) {
CreateDrawableContentLayer(&delegate);
SetLayerPropertiesForTesting(surface_no_scale_child_scale.get(),
child_scale_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(10, 10),
false,
@@ -4851,7 +4852,7 @@ TEST_F(LayerTreeHostCommonTest, ContentsScaleForSurfaces) {
CreateNoScaleDrawableContentLayer(&delegate);
SetLayerPropertiesForTesting(surface_no_scale_child_no_scale.get(),
child_scale_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(10, 10),
false,
@@ -4992,7 +4993,7 @@ TEST_F(LayerTreeHostCommonTest,
scoped_refptr<ContentLayer> parent = CreateDrawableContentLayer(&delegate);
SetLayerPropertiesForTesting(parent.get(),
parent_scale_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
false,
@@ -5002,7 +5003,7 @@ TEST_F(LayerTreeHostCommonTest,
CreateDrawableContentLayer(&delegate);
SetLayerPropertiesForTesting(surface_scale.get(),
child_scale_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(2.f, 2.f),
gfx::Size(10, 10),
false,
@@ -5012,7 +5013,7 @@ TEST_F(LayerTreeHostCommonTest,
CreateDrawableContentLayer(&delegate);
SetLayerPropertiesForTesting(surface_scale_child_scale.get(),
child_scale_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(10, 10),
false,
@@ -5022,7 +5023,7 @@ TEST_F(LayerTreeHostCommonTest,
CreateNoScaleDrawableContentLayer(&delegate);
SetLayerPropertiesForTesting(surface_scale_child_no_scale.get(),
child_scale_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(10, 10),
false,
@@ -5032,7 +5033,7 @@ TEST_F(LayerTreeHostCommonTest,
CreateNoScaleDrawableContentLayer(&delegate);
SetLayerPropertiesForTesting(surface_no_scale.get(),
child_scale_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(12.f, 12.f),
gfx::Size(10, 10),
false,
@@ -5042,7 +5043,7 @@ TEST_F(LayerTreeHostCommonTest,
CreateDrawableContentLayer(&delegate);
SetLayerPropertiesForTesting(surface_no_scale_child_scale.get(),
child_scale_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(10, 10),
false,
@@ -5052,7 +5053,7 @@ TEST_F(LayerTreeHostCommonTest,
CreateNoScaleDrawableContentLayer(&delegate);
SetLayerPropertiesForTesting(surface_no_scale_child_no_scale.get(),
child_scale_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(10, 10),
false,
@@ -5194,7 +5195,7 @@ TEST_F(LayerTreeHostCommonTest, ContentsScaleForAnimatingLayer) {
scoped_refptr<ContentLayer> parent = CreateDrawableContentLayer(&delegate);
SetLayerPropertiesForTesting(parent.get(),
parent_scale_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
false,
@@ -5204,7 +5205,7 @@ TEST_F(LayerTreeHostCommonTest, ContentsScaleForAnimatingLayer) {
CreateDrawableContentLayer(&delegate);
SetLayerPropertiesForTesting(child_scale.get(),
child_scale_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(2.f, 2.f),
gfx::Size(10, 10),
false,
@@ -5265,14 +5266,14 @@ TEST_F(LayerTreeHostCommonTest,
gfx::Transform identity_matrix;
SetLayerPropertiesForTesting(root.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
false);
SetLayerPropertiesForTesting(child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
@@ -5311,7 +5312,7 @@ TEST_F(LayerTreeHostCommonTest, RenderSurfaceTransformsInHighDPI) {
scoped_refptr<ContentLayer> parent = CreateDrawableContentLayer(&delegate);
SetLayerPropertiesForTesting(parent.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(30, 30),
false,
@@ -5320,7 +5321,7 @@ TEST_F(LayerTreeHostCommonTest, RenderSurfaceTransformsInHighDPI) {
scoped_refptr<ContentLayer> child = CreateDrawableContentLayer(&delegate);
SetLayerPropertiesForTesting(child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(2.f, 2.f),
gfx::Size(10, 10),
false,
@@ -5331,7 +5332,7 @@ TEST_F(LayerTreeHostCommonTest, RenderSurfaceTransformsInHighDPI) {
scoped_refptr<ContentLayer> replica = CreateDrawableContentLayer(&delegate);
SetLayerPropertiesForTesting(replica.get(),
replica_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(2.f, 2.f),
gfx::Size(10, 10),
false,
@@ -5343,7 +5344,7 @@ TEST_F(LayerTreeHostCommonTest, RenderSurfaceTransformsInHighDPI) {
CreateDrawableContentLayer(&delegate);
SetLayerPropertiesForTesting(duplicate_child_non_owner.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(10, 10),
false,
@@ -5446,7 +5447,7 @@ TEST_F(LayerTreeHostCommonTest,
scoped_refptr<ContentLayer> parent = CreateDrawableContentLayer(&delegate);
SetLayerPropertiesForTesting(parent.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(33, 31),
false,
@@ -5455,7 +5456,7 @@ TEST_F(LayerTreeHostCommonTest,
scoped_refptr<ContentLayer> child = CreateDrawableContentLayer(&delegate);
SetLayerPropertiesForTesting(child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(13, 11),
false,
@@ -5466,7 +5467,7 @@ TEST_F(LayerTreeHostCommonTest,
scoped_refptr<ContentLayer> replica = CreateDrawableContentLayer(&delegate);
SetLayerPropertiesForTesting(replica.get(),
replica_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(13, 11),
false,
@@ -5478,7 +5479,7 @@ TEST_F(LayerTreeHostCommonTest,
CreateDrawableContentLayer(&delegate);
SetLayerPropertiesForTesting(duplicate_child_non_owner.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(13, 11),
false,
@@ -5583,21 +5584,21 @@ TEST_F(LayerTreeHostCommonTest, TransparentChildRenderSurfaceCreation) {
const gfx::Transform identity_matrix;
SetLayerPropertiesForTesting(root.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
false);
SetLayerPropertiesForTesting(child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(grand_child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(10, 10),
true,
@@ -5625,7 +5626,7 @@ TEST_F(LayerTreeHostCommonTest, OpacityAnimatingOnPendingTree) {
const gfx::Transform identity_matrix;
SetLayerPropertiesForTesting(root.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(100, 100),
true,
@@ -5635,7 +5636,7 @@ TEST_F(LayerTreeHostCommonTest, OpacityAnimatingOnPendingTree) {
scoped_ptr<LayerImpl> child = LayerImpl::Create(host_impl.pending_tree(), 2);
SetLayerPropertiesForTesting(child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(50, 50),
true,
@@ -5678,21 +5679,21 @@ class LCDTextTest
gfx::Transform identity_matrix;
SetLayerPropertiesForTesting(root_.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(1, 1),
true,
false);
SetLayerPropertiesForTesting(child_.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(1, 1),
true,
false);
SetLayerPropertiesForTesting(grand_child_.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(1, 1),
true,
@@ -5825,7 +5826,7 @@ TEST_F(LayerTreeHostCommonTest, SubtreeHidden_SingleLayer) {
scoped_refptr<Layer> root = Layer::Create();
SetLayerPropertiesForTesting(root.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(50, 50),
true,
@@ -5835,7 +5836,7 @@ TEST_F(LayerTreeHostCommonTest, SubtreeHidden_SingleLayer) {
scoped_refptr<Layer> child = Layer::Create();
SetLayerPropertiesForTesting(child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(40, 40),
true,
@@ -5845,7 +5846,7 @@ TEST_F(LayerTreeHostCommonTest, SubtreeHidden_SingleLayer) {
scoped_refptr<Layer> grand_child = Layer::Create();
SetLayerPropertiesForTesting(grand_child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(30, 30),
true,
@@ -5883,7 +5884,7 @@ TEST_F(LayerTreeHostCommonTest, SubtreeHidden_SingleLayerImpl) {
scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl.pending_tree(), 1);
SetLayerPropertiesForTesting(root.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(50, 50),
true,
@@ -5893,7 +5894,7 @@ TEST_F(LayerTreeHostCommonTest, SubtreeHidden_SingleLayerImpl) {
scoped_ptr<LayerImpl> child = LayerImpl::Create(host_impl.pending_tree(), 2);
SetLayerPropertiesForTesting(child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(40, 40),
true,
@@ -5904,7 +5905,7 @@ TEST_F(LayerTreeHostCommonTest, SubtreeHidden_SingleLayerImpl) {
LayerImpl::Create(host_impl.pending_tree(), 3);
SetLayerPropertiesForTesting(grand_child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(30, 30),
true,
@@ -5939,7 +5940,7 @@ TEST_F(LayerTreeHostCommonTest, SubtreeHidden_TwoLayers) {
scoped_refptr<Layer> root = Layer::Create();
SetLayerPropertiesForTesting(root.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(50, 50),
true,
@@ -5949,7 +5950,7 @@ TEST_F(LayerTreeHostCommonTest, SubtreeHidden_TwoLayers) {
scoped_refptr<Layer> child = Layer::Create();
SetLayerPropertiesForTesting(child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(40, 40),
true,
@@ -5960,7 +5961,7 @@ TEST_F(LayerTreeHostCommonTest, SubtreeHidden_TwoLayers) {
scoped_refptr<Layer> grand_child = Layer::Create();
SetLayerPropertiesForTesting(grand_child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(30, 30),
true,
@@ -5996,7 +5997,7 @@ TEST_F(LayerTreeHostCommonTest, SubtreeHidden_TwoLayersImpl) {
scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl.pending_tree(), 1);
SetLayerPropertiesForTesting(root.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(50, 50),
true,
@@ -6006,7 +6007,7 @@ TEST_F(LayerTreeHostCommonTest, SubtreeHidden_TwoLayersImpl) {
scoped_ptr<LayerImpl> child = LayerImpl::Create(host_impl.pending_tree(), 2);
SetLayerPropertiesForTesting(child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(40, 40),
true,
@@ -6018,7 +6019,7 @@ TEST_F(LayerTreeHostCommonTest, SubtreeHidden_TwoLayersImpl) {
LayerImpl::Create(host_impl.pending_tree(), 3);
SetLayerPropertiesForTesting(grand_child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(30, 30),
true,
@@ -6053,7 +6054,7 @@ TEST_F(LayerTreeHostCommonTest, SubtreeHiddenWithCopyRequest) {
scoped_refptr<Layer> root = Layer::Create();
SetLayerPropertiesForTesting(root.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(50, 50),
true,
@@ -6063,7 +6064,7 @@ TEST_F(LayerTreeHostCommonTest, SubtreeHiddenWithCopyRequest) {
scoped_refptr<Layer> copy_grand_parent = Layer::Create();
SetLayerPropertiesForTesting(copy_grand_parent.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(40, 40),
true,
@@ -6073,7 +6074,7 @@ TEST_F(LayerTreeHostCommonTest, SubtreeHiddenWithCopyRequest) {
scoped_refptr<Layer> copy_parent = Layer::Create();
SetLayerPropertiesForTesting(copy_parent.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(30, 30),
true,
@@ -6084,7 +6085,7 @@ TEST_F(LayerTreeHostCommonTest, SubtreeHiddenWithCopyRequest) {
scoped_refptr<Layer> copy_layer = Layer::Create();
SetLayerPropertiesForTesting(copy_layer.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(20, 20),
true,
@@ -6094,7 +6095,7 @@ TEST_F(LayerTreeHostCommonTest, SubtreeHiddenWithCopyRequest) {
scoped_refptr<Layer> copy_child = Layer::Create();
SetLayerPropertiesForTesting(copy_child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(20, 20),
true,
@@ -6104,7 +6105,7 @@ TEST_F(LayerTreeHostCommonTest, SubtreeHiddenWithCopyRequest) {
scoped_refptr<Layer> copy_grand_parent_sibling_before = Layer::Create();
SetLayerPropertiesForTesting(copy_grand_parent_sibling_before.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(40, 40),
true,
@@ -6114,7 +6115,7 @@ TEST_F(LayerTreeHostCommonTest, SubtreeHiddenWithCopyRequest) {
scoped_refptr<Layer> copy_grand_parent_sibling_after = Layer::Create();
SetLayerPropertiesForTesting(copy_grand_parent_sibling_after.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(40, 40),
true,
@@ -6200,7 +6201,7 @@ TEST_F(LayerTreeHostCommonTest, ClippedOutCopyRequest) {
scoped_refptr<Layer> root = Layer::Create();
SetLayerPropertiesForTesting(root.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(50, 50),
true,
@@ -6210,7 +6211,7 @@ TEST_F(LayerTreeHostCommonTest, ClippedOutCopyRequest) {
scoped_refptr<Layer> copy_parent = Layer::Create();
SetLayerPropertiesForTesting(copy_parent.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(),
true,
@@ -6221,7 +6222,7 @@ TEST_F(LayerTreeHostCommonTest, ClippedOutCopyRequest) {
scoped_refptr<Layer> copy_layer = Layer::Create();
SetLayerPropertiesForTesting(copy_layer.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(30, 30),
true,
@@ -6231,7 +6232,7 @@ TEST_F(LayerTreeHostCommonTest, ClippedOutCopyRequest) {
scoped_refptr<Layer> copy_child = Layer::Create();
SetLayerPropertiesForTesting(copy_child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(20, 20),
true,
@@ -6275,7 +6276,7 @@ TEST_F(LayerTreeHostCommonTest, VisibleContentRectInsideSurface) {
scoped_refptr<Layer> root = Layer::Create();
SetLayerPropertiesForTesting(root.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(50, 50),
true,
@@ -6286,7 +6287,7 @@ TEST_F(LayerTreeHostCommonTest, VisibleContentRectInsideSurface) {
scoped_refptr<Layer> surface = Layer::Create();
SetLayerPropertiesForTesting(surface.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(-10, -20),
gfx::Size(),
true,
@@ -6296,7 +6297,7 @@ TEST_F(LayerTreeHostCommonTest, VisibleContentRectInsideSurface) {
scoped_refptr<Layer> surface_child = Layer::Create();
SetLayerPropertiesForTesting(surface_child.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(50, 50),
true,
@@ -6359,35 +6360,35 @@ TEST_F(LayerTreeHostCommonTest, TransformedClipParent) {
SetLayerPropertiesForTesting(root.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(50, 50),
true,
false);
SetLayerPropertiesForTesting(render_surface.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(clip_parent.get(),
scale_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(1.f, 1.f),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(intervening.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(1.f, 1.f),
gfx::Size(5, 5),
true,
false);
SetLayerPropertiesForTesting(clip_child.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(1.f, 1.f),
gfx::Size(10, 10),
true,
@@ -6463,42 +6464,42 @@ TEST_F(LayerTreeHostCommonTest, ClipParentWithInterveningRenderSurface) {
gfx::Transform identity_transform;
SetLayerPropertiesForTesting(root.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(50, 50),
true,
false);
SetLayerPropertiesForTesting(clip_parent.get(),
translation_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(1.f, 1.f),
gfx::Size(40, 40),
true,
false);
SetLayerPropertiesForTesting(render_surface1.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(intervening.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(1.f, 1.f),
gfx::Size(5, 5),
true,
false);
SetLayerPropertiesForTesting(render_surface2.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(clip_child.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(-10.f, -10.f),
gfx::Size(60, 60),
true,
@@ -6592,42 +6593,42 @@ TEST_F(LayerTreeHostCommonTest, ClipParentScrolledInterveningLayer) {
gfx::Transform identity_transform;
SetLayerPropertiesForTesting(root.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(50, 50),
true,
false);
SetLayerPropertiesForTesting(clip_parent.get(),
translation_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(1.f, 1.f),
gfx::Size(40, 40),
true,
false);
SetLayerPropertiesForTesting(render_surface1.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(intervening.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(1.f, 1.f),
gfx::Size(5, 5),
true,
false);
SetLayerPropertiesForTesting(render_surface2.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(clip_child.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(-10.f, -10.f),
gfx::Size(60, 60),
true,
@@ -6708,35 +6709,35 @@ TEST_F(LayerTreeHostCommonTest, DescendantsOfClipChildren) {
gfx::Transform identity_transform;
SetLayerPropertiesForTesting(root.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(50, 50),
true,
false);
SetLayerPropertiesForTesting(clip_parent.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(40, 40),
true,
false);
SetLayerPropertiesForTesting(intervening.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(5, 5),
true,
false);
SetLayerPropertiesForTesting(clip_child.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(60, 60),
true,
false);
SetLayerPropertiesForTesting(child.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(60, 60),
true,
@@ -6795,42 +6796,42 @@ TEST_F(LayerTreeHostCommonTest,
gfx::Transform identity_transform;
SetLayerPropertiesForTesting(root.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(15, 15),
true,
false);
SetLayerPropertiesForTesting(clip_parent.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(render_surface1.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(5, 5),
gfx::Size(5, 5),
true,
false);
SetLayerPropertiesForTesting(render_surface2.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(5, 5),
true,
false);
SetLayerPropertiesForTesting(clip_child.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(-1, 1),
gfx::Size(10, 10),
true,
false);
SetLayerPropertiesForTesting(non_clip_child.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(5, 5),
true,
@@ -6890,12 +6891,12 @@ TEST_F(LayerTreeHostCommonTest, CanRenderToSeparateSurface) {
LayerImpl::Create(host_impl.active_tree(), 12345678);
gfx::Transform identity_matrix;
- gfx::PointF anchor;
+ gfx::Point3F transform_origin;
gfx::PointF position;
gfx::Size bounds(100, 100);
SetLayerPropertiesForTesting(root.get(),
identity_matrix,
- anchor,
+ transform_origin,
position,
bounds,
true,
@@ -6906,7 +6907,7 @@ TEST_F(LayerTreeHostCommonTest, CanRenderToSeparateSurface) {
// behavior.
SetLayerPropertiesForTesting(child1.get(),
identity_matrix,
- anchor,
+ transform_origin,
position,
bounds,
false,
@@ -6914,7 +6915,7 @@ TEST_F(LayerTreeHostCommonTest, CanRenderToSeparateSurface) {
child1->SetDrawsContent(true);
SetLayerPropertiesForTesting(child2.get(),
identity_matrix,
- anchor,
+ transform_origin,
position,
bounds,
true,
@@ -6922,7 +6923,7 @@ TEST_F(LayerTreeHostCommonTest, CanRenderToSeparateSurface) {
child2->SetDrawsContent(true);
SetLayerPropertiesForTesting(child3.get(),
identity_matrix,
- anchor,
+ transform_origin,
position,
bounds,
true,
@@ -6969,21 +6970,21 @@ TEST_F(LayerTreeHostCommonTest, DoNotIncludeBackfaceInvisibleSurfaces) {
gfx::Transform identity_transform;
SetLayerPropertiesForTesting(root.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(50, 50),
true,
false);
SetLayerPropertiesForTesting(render_surface.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(30, 30),
false,
true);
SetLayerPropertiesForTesting(child.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(20, 20),
true,
@@ -7051,35 +7052,35 @@ TEST_F(LayerTreeHostCommonTest, ClippedByScrollParent) {
gfx::Transform identity_transform;
SetLayerPropertiesForTesting(root.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(50, 50),
true,
false);
SetLayerPropertiesForTesting(scroll_parent_border.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(40, 40),
true,
false);
SetLayerPropertiesForTesting(scroll_parent_clip.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(30, 30),
true,
false);
SetLayerPropertiesForTesting(scroll_parent.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(50, 50),
true,
false);
SetLayerPropertiesForTesting(scroll_child.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(50, 50),
true,
@@ -7111,7 +7112,7 @@ TEST_F(LayerTreeHostCommonTest, SingularTransformSubtreesDoNotDraw) {
gfx::Transform identity_transform;
SetLayerPropertiesForTesting(root.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(50, 50),
true,
@@ -7119,7 +7120,7 @@ TEST_F(LayerTreeHostCommonTest, SingularTransformSubtreesDoNotDraw) {
root->SetForceRenderSurface(true);
SetLayerPropertiesForTesting(parent.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(30, 30),
true,
@@ -7127,7 +7128,7 @@ TEST_F(LayerTreeHostCommonTest, SingularTransformSubtreesDoNotDraw) {
parent->SetForceRenderSurface(true);
SetLayerPropertiesForTesting(child.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(20, 20),
true,
@@ -7192,35 +7193,35 @@ TEST_F(LayerTreeHostCommonTest, ClippedByOutOfOrderScrollParent) {
gfx::Transform identity_transform;
SetLayerPropertiesForTesting(root.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(50, 50),
true,
false);
SetLayerPropertiesForTesting(scroll_parent_border.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(40, 40),
true,
false);
SetLayerPropertiesForTesting(scroll_parent_clip.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(30, 30),
true,
false);
SetLayerPropertiesForTesting(scroll_parent.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(50, 50),
true,
false);
SetLayerPropertiesForTesting(scroll_child.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(50, 50),
true,
@@ -7284,56 +7285,56 @@ TEST_F(LayerTreeHostCommonTest, ClippedByOutOfOrderScrollGrandparent) {
gfx::Transform identity_transform;
SetLayerPropertiesForTesting(root.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(50, 50),
true,
false);
SetLayerPropertiesForTesting(scroll_grandparent_border.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(40, 40),
true,
false);
SetLayerPropertiesForTesting(scroll_grandparent_clip.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(20, 20),
true,
false);
SetLayerPropertiesForTesting(scroll_grandparent.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(50, 50),
true,
false);
SetLayerPropertiesForTesting(scroll_parent_border.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(40, 40),
true,
false);
SetLayerPropertiesForTesting(scroll_parent_clip.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(30, 30),
true,
false);
SetLayerPropertiesForTesting(scroll_parent.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(50, 50),
true,
false);
SetLayerPropertiesForTesting(scroll_child.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(50, 50),
true,
@@ -7419,70 +7420,70 @@ TEST_F(LayerTreeHostCommonTest, OutOfOrderClippingRequiresRSLLSorting) {
gfx::Transform identity_transform;
SetLayerPropertiesForTesting(root.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(50, 50),
true,
false);
SetLayerPropertiesForTesting(scroll_grandparent_border.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(40, 40),
true,
false);
SetLayerPropertiesForTesting(scroll_grandparent_clip.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(20, 20),
true,
false);
SetLayerPropertiesForTesting(scroll_grandparent.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(50, 50),
true,
false);
SetLayerPropertiesForTesting(render_surface1.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(50, 50),
true,
false);
SetLayerPropertiesForTesting(scroll_parent_border.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(40, 40),
true,
false);
SetLayerPropertiesForTesting(scroll_parent_clip.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(30, 30),
true,
false);
SetLayerPropertiesForTesting(scroll_parent.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(50, 50),
true,
false);
SetLayerPropertiesForTesting(render_surface2.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(50, 50),
true,
false);
SetLayerPropertiesForTesting(scroll_child.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(50, 50),
true,
@@ -7569,49 +7570,49 @@ TEST_F(LayerTreeHostCommonTest, DoNotClobberSorting) {
SetLayerPropertiesForTesting(root.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(50, 50),
true,
false);
SetLayerPropertiesForTesting(scroll_parent_border.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(40, 40),
true,
false);
SetLayerPropertiesForTesting(scroll_parent_clip.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(30, 30),
true,
false);
SetLayerPropertiesForTesting(scroll_parent.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(50, 50),
true,
false);
SetLayerPropertiesForTesting(scroll_child.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(50, 50),
true,
false);
SetLayerPropertiesForTesting(top_content.get(),
top_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(50, 50),
false,
true);
SetLayerPropertiesForTesting(bottom_content.get(),
bottom_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(50, 50),
false,
@@ -7687,28 +7688,28 @@ TEST_F(LayerTreeHostCommonTest, ScrollCompensationWithRounding) {
SetLayerPropertiesForTesting(root.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(50, 50),
true,
false);
SetLayerPropertiesForTesting(container.get(),
container_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(40, 40),
true,
false);
SetLayerPropertiesForTesting(scroller.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(30, 30),
true,
false);
SetLayerPropertiesForTesting(fixed.get(),
identity_transform,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(50, 50),
true,
@@ -7876,28 +7877,28 @@ TEST_F(LayerTreeHostCommonTest, MaximumAnimationScaleFactor) {
SetLayerPropertiesForTesting(grand_parent.get(),
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(1, 2),
true,
false);
SetLayerPropertiesForTesting(parent_raw,
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(1, 2),
true,
false);
SetLayerPropertiesForTesting(child_raw,
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(1, 2),
true,
false);
SetLayerPropertiesForTesting(grand_child_raw,
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(1, 2),
true,
@@ -8080,35 +8081,35 @@ TEST_F(LayerTreeHostCommonTest, RenderSurfaceLayerListMembership) {
SetLayerPropertiesForTesting(grand_parent_raw,
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(1, 2),
true,
false);
SetLayerPropertiesForTesting(parent_raw,
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(1, 2),
true,
false);
SetLayerPropertiesForTesting(child_raw,
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(1, 2),
true,
false);
SetLayerPropertiesForTesting(grand_child1_raw,
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(1, 2),
true,
false);
SetLayerPropertiesForTesting(grand_child2_raw,
identity_matrix,
- gfx::PointF(),
+ gfx::Point3F(),
gfx::PointF(),
gfx::Size(1, 2),
true,
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
index 919382f..45d533b 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -182,7 +182,6 @@ class LayerTreeHostImplTest : public testing::Test,
}
void SetupRootLayerImpl(scoped_ptr<LayerImpl> root) {
- root->SetAnchorPoint(gfx::PointF());
root->SetPosition(gfx::PointF());
root->SetBounds(gfx::Size(10, 10));
root->SetContentBounds(gfx::Size(10, 10));
@@ -234,7 +233,6 @@ class LayerTreeHostImplTest : public testing::Test,
root->SetBounds(content_size);
root->SetContentBounds(content_size);
root->SetPosition(gfx::PointF());
- root->SetAnchorPoint(gfx::PointF());
scoped_ptr<LayerImpl> scroll =
LayerImpl::Create(layer_tree_impl, kInnerViewportScrollLayerId);
@@ -254,7 +252,6 @@ class LayerTreeHostImplTest : public testing::Test,
scroll->SetBounds(content_size);
scroll->SetContentBounds(content_size);
scroll->SetPosition(gfx::PointF());
- scroll->SetAnchorPoint(gfx::PointF());
scroll->SetIsContainerForFixedPositionLayers(true);
scoped_ptr<LayerImpl> contents =
@@ -263,7 +260,6 @@ class LayerTreeHostImplTest : public testing::Test,
contents->SetBounds(content_size);
contents->SetContentBounds(content_size);
contents->SetPosition(gfx::PointF());
- contents->SetAnchorPoint(gfx::PointF());
scroll->AddChild(contents.Pass());
page_scale->AddChild(scroll.Pass());
@@ -845,7 +841,6 @@ TEST_F(LayerTreeHostImplTest, DISABLED_ScrollWithUserUnscrollableLayers) {
overflow->SetScrollClipLayer(scroll_layer->parent()->id());
overflow->SetScrollOffset(gfx::Vector2d());
overflow->SetPosition(gfx::PointF());
- overflow->SetAnchorPoint(gfx::PointF());
DrawFrame();
gfx::Point scroll_position(10, 10);
@@ -1691,7 +1686,6 @@ class DidDrawCheckLayer : public TiledLayerImpl {
will_draw_called_(false),
append_quads_called_(false),
did_draw_called_(false) {
- SetAnchorPoint(gfx::PointF());
SetBounds(gfx::Size(10, 10));
SetContentBounds(gfx::Size(10, 10));
SetDrawsContent(true);
@@ -2135,7 +2129,6 @@ class LayerTreeHostImplTopControlsTest : public LayerTreeHostImplTest {
root->SetBounds(layer_size_);
root->SetContentBounds(layer_size_);
root->SetPosition(gfx::PointF());
- root->SetAnchorPoint(gfx::PointF());
root->SetDrawsContent(false);
root->SetIsContainerForFixedPositionLayers(true);
int inner_viewport_scroll_layer_id = root->id();
@@ -2274,7 +2267,6 @@ TEST_F(LayerTreeHostImplTest, ScrollNonCompositedRoot) {
LayerImpl::Create(host_impl_->active_tree(), 1);
content_layer->SetDrawsContent(true);
content_layer->SetPosition(gfx::PointF());
- content_layer->SetAnchorPoint(gfx::PointF());
content_layer->SetBounds(contents_size);
content_layer->SetContentBounds(contents_size);
content_layer->SetContentsScale(2.f, 2.f);
@@ -2289,7 +2281,6 @@ TEST_F(LayerTreeHostImplTest, ScrollNonCompositedRoot) {
scroll_layer->SetBounds(contents_size);
scroll_layer->SetContentBounds(contents_size);
scroll_layer->SetPosition(gfx::PointF());
- scroll_layer->SetAnchorPoint(gfx::PointF());
scroll_layer->AddChild(content_layer.Pass());
scroll_clip_layer->AddChild(scroll_layer.Pass());
@@ -2900,10 +2891,11 @@ TEST_F(LayerTreeHostImplTest, ScrollNonAxisAlignedRotatedLayer) {
// Only allow vertical scrolling.
clip_layer->SetBounds(
gfx::Size(child->bounds().width(), child->bounds().height() / 2));
- // The rotation depends on the layer's anchor point, and the child layer is a
- // different size than the clip, so make sure the clip layer's anchor lines
- // up over the child.
- clip_layer->SetAnchorPoint(gfx::PointF(0.5, 1.0));
+ // The rotation depends on the layer's transform origin, and the child layer
+ // is a different size than the clip, so make sure the clip layer's origin
+ // lines up over the child.
+ clip_layer->SetTransformOrigin(gfx::Point3F(
+ clip_layer->bounds().width() * 0.5f, clip_layer->bounds().height(), 0.f));
LayerImpl* child_ptr = child.get();
clip_layer->AddChild(child.Pass());
scroll_layer->AddChild(clip_layer.Pass());
@@ -3495,7 +3487,6 @@ class BlendStateCheckLayer : public LayerImpl {
ResourceProvider::TextureUsageAny,
RGBA_8888)) {
resource_provider->AllocateForTesting(resource_id_);
- SetAnchorPoint(gfx::PointF());
SetBounds(gfx::Size(10, 10));
SetContentBounds(gfx::Size(10, 10));
SetDrawsContent(true);
@@ -3514,7 +3505,6 @@ TEST_F(LayerTreeHostImplTest, BlendingOffWhenDrawingOpaqueLayers) {
{
scoped_ptr<LayerImpl> root =
LayerImpl::Create(host_impl_->active_tree(), 1);
- root->SetAnchorPoint(gfx::PointF());
root->SetBounds(gfx::Size(10, 10));
root->SetContentBounds(root->bounds());
root->SetDrawsContent(false);
@@ -4041,7 +4031,6 @@ TEST_F(LayerTreeHostImplTest, ReshapeNotCalledUntilDraw) {
scoped_ptr<LayerImpl> root =
FakeDrawableLayerImpl::Create(host_impl_->active_tree(), 1);
- root->SetAnchorPoint(gfx::PointF());
root->SetBounds(gfx::Size(10, 10));
root->SetContentBounds(gfx::Size(10, 10));
root->SetDrawsContent(true);
@@ -4114,11 +4103,9 @@ TEST_F(LayerTreeHostImplTest, PartialSwapReceivesDamageRect) {
scoped_ptr<LayerImpl> child =
FakeDrawableLayerImpl::Create(layer_tree_host_impl->active_tree(), 2);
child->SetPosition(gfx::PointF(12.f, 13.f));
- child->SetAnchorPoint(gfx::PointF());
child->SetBounds(gfx::Size(14, 15));
child->SetContentBounds(gfx::Size(14, 15));
child->SetDrawsContent(true);
- root->SetAnchorPoint(gfx::PointF());
root->SetBounds(gfx::Size(500, 500));
root->SetContentBounds(gfx::Size(500, 500));
root->SetDrawsContent(true);
@@ -4174,11 +4161,9 @@ TEST_F(LayerTreeHostImplTest, RootLayerDoesntCreateExtraSurface) {
FakeDrawableLayerImpl::Create(host_impl_->active_tree(), 1);
scoped_ptr<LayerImpl> child =
FakeDrawableLayerImpl::Create(host_impl_->active_tree(), 2);
- child->SetAnchorPoint(gfx::PointF());
child->SetBounds(gfx::Size(10, 10));
child->SetContentBounds(gfx::Size(10, 10));
child->SetDrawsContent(true);
- root->SetAnchorPoint(gfx::PointF());
root->SetBounds(gfx::Size(10, 10));
root->SetContentBounds(gfx::Size(10, 10));
root->SetDrawsContent(true);
@@ -4434,7 +4419,6 @@ static scoped_ptr<LayerTreeHostImpl> SetupLayersForOpacity(
gfx::Rect grand_child_rect(5, 5, 150, 150);
root->CreateRenderSurface();
- root->SetAnchorPoint(gfx::PointF());
root->SetPosition(root_rect.origin());
root->SetBounds(root_rect.size());
root->SetContentBounds(root->bounds());
@@ -4442,7 +4426,6 @@ static scoped_ptr<LayerTreeHostImpl> SetupLayersForOpacity(
root->SetDrawsContent(false);
root->render_surface()->SetContentRect(gfx::Rect(root_rect.size()));
- child->SetAnchorPoint(gfx::PointF());
child->SetPosition(gfx::PointF(child_rect.x(), child_rect.y()));
child->SetOpacity(0.5f);
child->SetBounds(gfx::Size(child_rect.width(), child_rect.height()));
@@ -4451,7 +4434,6 @@ static scoped_ptr<LayerTreeHostImpl> SetupLayersForOpacity(
child->SetDrawsContent(false);
child->SetForceRenderSurface(true);
- grand_child->SetAnchorPoint(gfx::PointF());
grand_child->SetPosition(grand_child_rect.origin());
grand_child->SetBounds(grand_child_rect.size());
grand_child->SetContentBounds(grand_child->bounds());
@@ -4530,7 +4512,6 @@ TEST_F(LayerTreeHostImplTest, LayersFreeTextures) {
scoped_ptr<LayerImpl> root_layer =
LayerImpl::Create(host_impl_->active_tree(), 1);
root_layer->SetBounds(gfx::Size(10, 10));
- root_layer->SetAnchorPoint(gfx::PointF());
scoped_refptr<VideoFrame> softwareFrame =
media::VideoFrame::CreateColorFrame(
@@ -4540,7 +4521,6 @@ TEST_F(LayerTreeHostImplTest, LayersFreeTextures) {
scoped_ptr<VideoLayerImpl> video_layer =
VideoLayerImpl::Create(host_impl_->active_tree(), 4, &provider);
video_layer->SetBounds(gfx::Size(10, 10));
- video_layer->SetAnchorPoint(gfx::PointF());
video_layer->SetContentBounds(gfx::Size(10, 10));
video_layer->SetDrawsContent(true);
root_layer->AddChild(video_layer.PassAs<LayerImpl>());
@@ -4548,7 +4528,6 @@ TEST_F(LayerTreeHostImplTest, LayersFreeTextures) {
scoped_ptr<IOSurfaceLayerImpl> io_surface_layer =
IOSurfaceLayerImpl::Create(host_impl_->active_tree(), 5);
io_surface_layer->SetBounds(gfx::Size(10, 10));
- io_surface_layer->SetAnchorPoint(gfx::PointF());
io_surface_layer->SetContentBounds(gfx::Size(10, 10));
io_surface_layer->SetDrawsContent(true);
io_surface_layer->SetIOSurfaceProperties(1, gfx::Size(10, 10));
@@ -4705,7 +4684,6 @@ class LayerTreeHostImplTestWithDelegatingRenderer
TEST_F(LayerTreeHostImplTestWithDelegatingRenderer, FrameIncludesDamageRect) {
scoped_ptr<SolidColorLayerImpl> root =
SolidColorLayerImpl::Create(host_impl_->active_tree(), 1);
- root->SetAnchorPoint(gfx::PointF());
root->SetPosition(gfx::PointF());
root->SetBounds(gfx::Size(10, 10));
root->SetContentBounds(gfx::Size(10, 10));
@@ -4714,7 +4692,6 @@ TEST_F(LayerTreeHostImplTestWithDelegatingRenderer, FrameIncludesDamageRect) {
// Child layer is in the bottom right corner.
scoped_ptr<SolidColorLayerImpl> child =
SolidColorLayerImpl::Create(host_impl_->active_tree(), 2);
- child->SetAnchorPoint(gfx::PointF(0.f, 0.f));
child->SetPosition(gfx::PointF(9.f, 9.f));
child->SetBounds(gfx::Size(1, 1));
child->SetContentBounds(gfx::Size(1, 1));
@@ -4797,13 +4774,11 @@ TEST_F(LayerTreeHostImplTest, MaskLayerWithScaling) {
root->SetBounds(root_size);
root->SetContentBounds(root_size);
root->SetPosition(gfx::PointF());
- root->SetAnchorPoint(gfx::PointF());
gfx::Size scaling_layer_size(50, 50);
scaling_layer->SetBounds(scaling_layer_size);
scaling_layer->SetContentBounds(scaling_layer_size);
scaling_layer->SetPosition(gfx::PointF());
- scaling_layer->SetAnchorPoint(gfx::PointF());
gfx::Transform scale;
scale.Scale(2.f, 2.f);
scaling_layer->SetTransform(scale);
@@ -4811,13 +4786,11 @@ TEST_F(LayerTreeHostImplTest, MaskLayerWithScaling) {
content_layer->SetBounds(scaling_layer_size);
content_layer->SetContentBounds(scaling_layer_size);
content_layer->SetPosition(gfx::PointF());
- content_layer->SetAnchorPoint(gfx::PointF());
content_layer->SetDrawsContent(true);
mask_layer->SetBounds(scaling_layer_size);
mask_layer->SetContentBounds(scaling_layer_size);
mask_layer->SetPosition(gfx::PointF());
- mask_layer->SetAnchorPoint(gfx::PointF());
mask_layer->SetDrawsContent(true);
@@ -4927,20 +4900,17 @@ TEST_F(LayerTreeHostImplTest, MaskLayerWithDifferentBounds) {
root->SetBounds(root_size);
root->SetContentBounds(root_size);
root->SetPosition(gfx::PointF());
- root->SetAnchorPoint(gfx::PointF());
gfx::Size layer_size(50, 50);
content_layer->SetBounds(layer_size);
content_layer->SetContentBounds(layer_size);
content_layer->SetPosition(gfx::PointF());
- content_layer->SetAnchorPoint(gfx::PointF());
content_layer->SetDrawsContent(true);
gfx::Size mask_size(100, 100);
mask_layer->SetBounds(mask_size);
mask_layer->SetContentBounds(mask_size);
mask_layer->SetPosition(gfx::PointF());
- mask_layer->SetAnchorPoint(gfx::PointF());
mask_layer->SetDrawsContent(true);
// Check that the mask fills the surface.
@@ -5077,20 +5047,17 @@ TEST_F(LayerTreeHostImplTest, ReflectionMaskLayerWithDifferentBounds) {
root->SetBounds(root_size);
root->SetContentBounds(root_size);
root->SetPosition(gfx::PointF());
- root->SetAnchorPoint(gfx::PointF());
gfx::Size layer_size(50, 50);
content_layer->SetBounds(layer_size);
content_layer->SetContentBounds(layer_size);
content_layer->SetPosition(gfx::PointF());
- content_layer->SetAnchorPoint(gfx::PointF());
content_layer->SetDrawsContent(true);
gfx::Size mask_size(100, 100);
mask_layer->SetBounds(mask_size);
mask_layer->SetContentBounds(mask_size);
mask_layer->SetPosition(gfx::PointF());
- mask_layer->SetAnchorPoint(gfx::PointF());
mask_layer->SetDrawsContent(true);
// Check that the mask fills the surface.
@@ -5236,27 +5203,23 @@ TEST_F(LayerTreeHostImplTest, ReflectionMaskLayerForSurfaceWithUnclippedChild) {
root->SetBounds(root_size);
root->SetContentBounds(root_size);
root->SetPosition(gfx::PointF());
- root->SetAnchorPoint(gfx::PointF());
gfx::Size layer_size(50, 50);
content_layer->SetBounds(layer_size);
content_layer->SetContentBounds(layer_size);
content_layer->SetPosition(gfx::PointF());
- content_layer->SetAnchorPoint(gfx::PointF());
content_layer->SetDrawsContent(true);
gfx::Size child_size(50, 50);
content_child_layer->SetBounds(child_size);
content_child_layer->SetContentBounds(child_size);
content_child_layer->SetPosition(gfx::Point(50, 0));
- content_child_layer->SetAnchorPoint(gfx::PointF());
content_child_layer->SetDrawsContent(true);
gfx::Size mask_size(50, 50);
mask_layer->SetBounds(mask_size);
mask_layer->SetContentBounds(mask_size);
mask_layer->SetPosition(gfx::PointF());
- mask_layer->SetAnchorPoint(gfx::PointF());
mask_layer->SetDrawsContent(true);
float device_scale_factor = 1.f;
@@ -5362,34 +5325,29 @@ TEST_F(LayerTreeHostImplTest, MaskLayerForSurfaceWithClippedLayer) {
root->SetBounds(root_size);
root->SetContentBounds(root_size);
root->SetPosition(gfx::PointF());
- root->SetAnchorPoint(gfx::PointF());
gfx::Rect clipping_rect(20, 10, 10, 20);
clipping_layer->SetBounds(clipping_rect.size());
clipping_layer->SetContentBounds(clipping_rect.size());
clipping_layer->SetPosition(clipping_rect.origin());
- clipping_layer->SetAnchorPoint(gfx::PointF());
clipping_layer->SetMasksToBounds(true);
gfx::Size layer_size(50, 50);
content_layer->SetBounds(layer_size);
content_layer->SetContentBounds(layer_size);
content_layer->SetPosition(gfx::Point() - clipping_rect.OffsetFromOrigin());
- content_layer->SetAnchorPoint(gfx::PointF());
content_layer->SetDrawsContent(true);
gfx::Size child_size(50, 50);
content_child_layer->SetBounds(child_size);
content_child_layer->SetContentBounds(child_size);
content_child_layer->SetPosition(gfx::Point(50, 0));
- content_child_layer->SetAnchorPoint(gfx::PointF());
content_child_layer->SetDrawsContent(true);
gfx::Size mask_size(100, 100);
mask_layer->SetBounds(mask_size);
mask_layer->SetContentBounds(mask_size);
mask_layer->SetPosition(gfx::PointF());
- mask_layer->SetAnchorPoint(gfx::PointF());
mask_layer->SetDrawsContent(true);
float device_scale_factor = 1.f;
@@ -6098,7 +6056,6 @@ TEST_F(LayerTreeHostImplTest, ScrollUnknownNotOnAncestorChain) {
occluder_layer->SetBounds(content_size);
occluder_layer->SetContentBounds(content_size);
occluder_layer->SetPosition(gfx::PointF());
- occluder_layer->SetAnchorPoint(gfx::PointF());
// The parent of the occluder is *above* the scroller.
page_scale_layer->AddChild(occluder_layer.Pass());
@@ -6128,7 +6085,6 @@ TEST_F(LayerTreeHostImplTest, ScrollUnknownScrollAncestorMismatch) {
occluder_layer->SetBounds(content_size);
occluder_layer->SetContentBounds(content_size);
occluder_layer->SetPosition(gfx::PointF(-10.f, -10.f));
- occluder_layer->SetAnchorPoint(gfx::PointF());
int child_scroll_clip_layer_id = 7;
scoped_ptr<LayerImpl> child_scroll_clip =
@@ -6202,7 +6158,6 @@ TEST_F(LayerTreeHostImplTest, ScrollInvisibleScrollerWithVisibleScrollChild) {
scroll_child->SetContentBounds(content_size);
// Move the scroll child so it's not hit by our test point.
scroll_child->SetPosition(gfx::PointF(10.f, 10.f));
- scroll_child->SetAnchorPoint(gfx::PointF());
int invisible_scroll_layer_id = 7;
scoped_ptr<LayerImpl> invisible_scroll =
@@ -6243,7 +6198,6 @@ TEST_F(LayerTreeHostImplTest, ScrollInvisibleScrollerWithVisibleScrollChild) {
TEST_F(LayerTreeHostImplTest, LatencyInfoPassedToCompositorFrameMetadata) {
scoped_ptr<SolidColorLayerImpl> root =
SolidColorLayerImpl::Create(host_impl_->active_tree(), 1);
- root->SetAnchorPoint(gfx::PointF());
root->SetPosition(gfx::PointF());
root->SetBounds(gfx::Size(10, 10));
root->SetContentBounds(gfx::Size(10, 10));
@@ -6460,7 +6414,6 @@ class LayerTreeHostImplVirtualViewportTest : public LayerTreeHostImplTest {
inner_scroll->SetBounds(outer_viewport);
inner_scroll->SetContentBounds(outer_viewport);
inner_scroll->SetPosition(gfx::PointF());
- inner_scroll->SetAnchorPoint(gfx::PointF());
scoped_ptr<LayerImpl> outer_clip =
LayerImpl::Create(layer_tree_impl, kOuterViewportClipLayerId);
@@ -6474,7 +6427,6 @@ class LayerTreeHostImplVirtualViewportTest : public LayerTreeHostImplTest {
outer_scroll->SetBounds(content_size);
outer_scroll->SetContentBounds(content_size);
outer_scroll->SetPosition(gfx::PointF());
- outer_scroll->SetAnchorPoint(gfx::PointF());
scoped_ptr<LayerImpl> contents =
LayerImpl::Create(layer_tree_impl, 8);
@@ -6482,7 +6434,6 @@ class LayerTreeHostImplVirtualViewportTest : public LayerTreeHostImplTest {
contents->SetBounds(content_size);
contents->SetContentBounds(content_size);
contents->SetPosition(gfx::PointF());
- contents->SetAnchorPoint(gfx::PointF());
outer_scroll->AddChild(contents.Pass());
outer_clip->AddChild(outer_scroll.Pass());
diff --git a/cc/trees/layer_tree_host_pixeltest_masks.cc b/cc/trees/layer_tree_host_pixeltest_masks.cc
index 54c95da..9b38686 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());
diff --git a/cc/trees/layer_tree_host_pixeltest_on_demand_raster.cc b/cc/trees/layer_tree_host_pixeltest_on_demand_raster.cc
index 47964fd..5bc2f31 100644
--- a/cc/trees/layer_tree_host_pixeltest_on_demand_raster.cc
+++ b/cc/trees/layer_tree_host_pixeltest_on_demand_raster.cc
@@ -98,7 +98,6 @@ TEST_F(LayerTreeHostOnDemandRasterPixelTest, RasterPictureLayer) {
scoped_refptr<PictureLayer> layer = PictureLayer::Create(&client);
layer->SetIsDrawable(true);
- layer->SetAnchorPoint(gfx::PointF());
layer->SetBounds(layer_rect.size());
layer->SetPosition(layer_rect.origin());
diff --git a/cc/trees/layer_tree_host_pixeltest_readback.cc b/cc/trees/layer_tree_host_pixeltest_readback.cc
index 2377da8..4c80839 100644
--- a/cc/trees/layer_tree_host_pixeltest_readback.cc
+++ b/cc/trees/layer_tree_host_pixeltest_readback.cc
@@ -954,18 +954,15 @@ class LayerTreeHostReadbackDeviceScalePixelTest
TEST_F(LayerTreeHostReadbackDeviceScalePixelTest,
ReadbackSubrect_Software) {
scoped_refptr<ContentLayer> background = ContentLayer::Create(&white_client_);
- background->SetAnchorPoint(gfx::PointF());
background->SetBounds(gfx::Size(100, 100));
background->SetIsDrawable(true);
scoped_refptr<ContentLayer> green = ContentLayer::Create(&green_client_);
- green->SetAnchorPoint(gfx::PointF());
green->SetBounds(gfx::Size(100, 100));
green->SetIsDrawable(true);
background->AddChild(green);
scoped_refptr<ContentLayer> blue = ContentLayer::Create(&blue_client_);
- blue->SetAnchorPoint(gfx::PointF());
blue->SetPosition(gfx::Point(50, 50));
blue->SetBounds(gfx::Size(25, 25));
blue->SetIsDrawable(true);
@@ -985,18 +982,15 @@ TEST_F(LayerTreeHostReadbackDeviceScalePixelTest,
TEST_F(LayerTreeHostReadbackDeviceScalePixelTest,
ReadbackSubrect_GL) {
scoped_refptr<ContentLayer> background = ContentLayer::Create(&white_client_);
- background->SetAnchorPoint(gfx::PointF());
background->SetBounds(gfx::Size(100, 100));
background->SetIsDrawable(true);
scoped_refptr<ContentLayer> green = ContentLayer::Create(&green_client_);
- green->SetAnchorPoint(gfx::PointF());
green->SetBounds(gfx::Size(100, 100));
green->SetIsDrawable(true);
background->AddChild(green);
scoped_refptr<ContentLayer> blue = ContentLayer::Create(&blue_client_);
- blue->SetAnchorPoint(gfx::PointF());
blue->SetPosition(gfx::Point(50, 50));
blue->SetBounds(gfx::Size(25, 25));
blue->SetIsDrawable(true);
@@ -1016,19 +1010,16 @@ TEST_F(LayerTreeHostReadbackDeviceScalePixelTest,
TEST_F(LayerTreeHostReadbackDeviceScalePixelTest,
ReadbackNonRootLayerSubrect_Software) {
scoped_refptr<ContentLayer> background = ContentLayer::Create(&white_client_);
- background->SetAnchorPoint(gfx::PointF());
background->SetBounds(gfx::Size(100, 100));
background->SetIsDrawable(true);
scoped_refptr<ContentLayer> green = ContentLayer::Create(&green_client_);
- green->SetAnchorPoint(gfx::PointF());
green->SetPosition(gfx::Point(10, 20));
green->SetBounds(gfx::Size(90, 80));
green->SetIsDrawable(true);
background->AddChild(green);
scoped_refptr<ContentLayer> blue = ContentLayer::Create(&blue_client_);
- blue->SetAnchorPoint(gfx::PointF());
blue->SetPosition(gfx::Point(50, 50));
blue->SetBounds(gfx::Size(25, 25));
blue->SetIsDrawable(true);
@@ -1049,19 +1040,16 @@ TEST_F(LayerTreeHostReadbackDeviceScalePixelTest,
TEST_F(LayerTreeHostReadbackDeviceScalePixelTest,
ReadbackNonRootLayerSubrect_GL) {
scoped_refptr<ContentLayer> background = ContentLayer::Create(&white_client_);
- background->SetAnchorPoint(gfx::PointF());
background->SetBounds(gfx::Size(100, 100));
background->SetIsDrawable(true);
scoped_refptr<ContentLayer> green = ContentLayer::Create(&green_client_);
- green->SetAnchorPoint(gfx::PointF());
green->SetPosition(gfx::Point(10, 20));
green->SetBounds(gfx::Size(90, 80));
green->SetIsDrawable(true);
background->AddChild(green);
scoped_refptr<ContentLayer> blue = ContentLayer::Create(&blue_client_);
- blue->SetAnchorPoint(gfx::PointF());
blue->SetPosition(gfx::Point(50, 50));
blue->SetBounds(gfx::Size(25, 25));
blue->SetIsDrawable(true);
diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc
index 472477b..870f2df 100644
--- a/cc/trees/layer_tree_host_unittest.cc
+++ b/cc/trees/layer_tree_host_unittest.cc
@@ -1004,7 +1004,6 @@ class ContentLayerWithUpdateTracking : public ContentLayer {
private:
explicit ContentLayerWithUpdateTracking(ContentLayerClient* client)
: ContentLayer(client), paint_contents_count_(0) {
- SetAnchorPoint(gfx::PointF(0.f, 0.f));
SetBounds(gfx::Size(10, 10));
SetIsDrawable(true);
}
@@ -1094,12 +1093,10 @@ class LayerTreeHostTestDeviceScaleFactorScalesViewportAndLayers
root_layer_->SetIsDrawable(true);
root_layer_->SetBounds(gfx::Size(30, 30));
- root_layer_->SetAnchorPoint(gfx::PointF(0.f, 0.f));
child_layer_->SetIsDrawable(true);
child_layer_->SetPosition(gfx::Point(2, 2));
child_layer_->SetBounds(gfx::Size(10, 10));
- child_layer_->SetAnchorPoint(gfx::PointF(0.f, 0.f));
layer_tree_host()->SetRootLayer(root_layer_);
@@ -1343,7 +1340,7 @@ MULTI_THREAD_DELEGATING_RENDERER_NOIMPL_TEST_F(
static void SetLayerPropertiesForTesting(Layer* layer,
Layer* parent,
const gfx::Transform& transform,
- const gfx::PointF& anchor,
+ const gfx::Point3F& transform_origin,
const gfx::PointF& position,
const gfx::Size& bounds,
bool opaque) {
@@ -1351,7 +1348,7 @@ static void SetLayerPropertiesForTesting(Layer* layer,
if (parent)
parent->AddChild(layer);
layer->SetTransform(transform);
- layer->SetAnchorPoint(anchor);
+ layer->SetTransformOrigin(transform_origin);
layer->SetPosition(position);
layer->SetBounds(bounds);
layer->SetContentsOpaque(opaque);
@@ -1729,7 +1726,7 @@ class LayerTreeHostTestEvictTextures : public LayerTreeHostTest {
SetLayerPropertiesForTesting(layer_.get(),
0,
identity_matrix,
- gfx::PointF(0.f, 0.f),
+ gfx::Point3F(0.f, 0.f, 0.f),
gfx::PointF(0.f, 0.f),
gfx::Size(10, 20),
true);
@@ -1896,7 +1893,6 @@ class LayerTreeHostTestContinuousInvalidate : public LayerTreeHostTest {
content_layer_ = ContentLayer::Create(&client_);
content_layer_->SetBounds(gfx::Size(10, 10));
content_layer_->SetPosition(gfx::PointF(0.f, 0.f));
- content_layer_->SetAnchorPoint(gfx::PointF(0.f, 0.f));
content_layer_->SetIsDrawable(true);
layer_tree_host()->root_layer()->AddChild(content_layer_);
@@ -2548,7 +2544,6 @@ class LayerTreeHostTestIOSurfaceDrawing : public LayerTreeHostTest {
scoped_refptr<IOSurfaceLayer> io_surface_layer = IOSurfaceLayer::Create();
io_surface_layer->SetBounds(gfx::Size(10, 10));
- io_surface_layer->SetAnchorPoint(gfx::PointF());
io_surface_layer->SetIsDrawable(true);
io_surface_layer->SetContentsOpaque(true);
io_surface_layer->SetIOSurfaceProperties(io_surface_id_, io_surface_size_);
@@ -2956,7 +2951,6 @@ class PushPropertiesCountingLayerImpl : public LayerImpl {
PushPropertiesCountingLayerImpl(LayerTreeImpl* tree_impl, int id)
: LayerImpl(tree_impl, id),
push_properties_count_(0) {
- SetAnchorPoint(gfx::PointF());
SetBounds(gfx::Size(1, 1));
}
};
@@ -2990,7 +2984,6 @@ class PushPropertiesCountingLayer : public Layer {
private:
PushPropertiesCountingLayer()
: push_properties_count_(0), persist_needs_push_properties_(false) {
- SetAnchorPoint(gfx::PointF());
SetBounds(gfx::Size(1, 1));
SetIsDrawable(true);
}
@@ -4016,19 +4009,16 @@ class LayerTreeHostTestPushHiddenLayer : public LayerTreeHostTest {
protected:
virtual void SetupTree() OVERRIDE {
root_layer_ = Layer::Create();
- root_layer_->SetAnchorPoint(gfx::PointF());
root_layer_->SetPosition(gfx::Point());
root_layer_->SetBounds(gfx::Size(10, 10));
parent_layer_ = SolidColorLayer::Create();
- parent_layer_->SetAnchorPoint(gfx::PointF());
parent_layer_->SetPosition(gfx::Point());
parent_layer_->SetBounds(gfx::Size(10, 10));
parent_layer_->SetIsDrawable(true);
root_layer_->AddChild(parent_layer_);
child_layer_ = SolidColorLayer::Create();
- child_layer_->SetAnchorPoint(gfx::PointF());
child_layer_->SetPosition(gfx::Point());
child_layer_->SetBounds(gfx::Size(10, 10));
child_layer_->SetIsDrawable(true);
@@ -4089,7 +4079,6 @@ class LayerTreeHostTestUpdateLayerInEmptyViewport : public LayerTreeHostTest {
virtual void SetupTree() OVERRIDE {
root_layer_ = FakePictureLayer::Create(&client_);
- root_layer_->SetAnchorPoint(gfx::PointF());
root_layer_->SetBounds(gfx::Size(10, 10));
layer_tree_host()->SetRootLayer(root_layer_);
diff --git a/cc/trees/layer_tree_host_unittest_context.cc b/cc/trees/layer_tree_host_unittest_context.cc
index 3128f47..47edbb1 100644
--- a/cc/trees/layer_tree_host_unittest_context.cc
+++ b/cc/trees/layer_tree_host_unittest_context.cc
@@ -308,12 +308,10 @@ class LayerTreeHostContextTestLostContextSucceedsWithContent
virtual void SetupTree() OVERRIDE {
root_ = Layer::Create();
root_->SetBounds(gfx::Size(10, 10));
- root_->SetAnchorPoint(gfx::PointF());
root_->SetIsDrawable(true);
content_ = FakeContentLayer::Create(&client_);
content_->SetBounds(gfx::Size(10, 10));
- content_->SetAnchorPoint(gfx::PointF());
content_->SetIsDrawable(true);
root_->AddChild(content_);
@@ -729,25 +727,21 @@ class LayerTreeHostContextTestDontUseLostResources
scoped_refptr<Layer> root = Layer::Create();
root->SetBounds(gfx::Size(10, 10));
- root->SetAnchorPoint(gfx::PointF());
root->SetIsDrawable(true);
scoped_refptr<FakeDelegatedRendererLayer> delegated =
FakeDelegatedRendererLayer::Create(delegated_frame_provider_.get());
delegated->SetBounds(gfx::Size(10, 10));
- delegated->SetAnchorPoint(gfx::PointF());
delegated->SetIsDrawable(true);
root->AddChild(delegated);
scoped_refptr<ContentLayer> content = ContentLayer::Create(&client_);
content->SetBounds(gfx::Size(10, 10));
- content->SetAnchorPoint(gfx::PointF());
content->SetIsDrawable(true);
root->AddChild(content);
scoped_refptr<TextureLayer> texture = TextureLayer::CreateForMailbox(NULL);
texture->SetBounds(gfx::Size(10, 10));
- texture->SetAnchorPoint(gfx::PointF());
texture->SetIsDrawable(true);
texture->SetTextureMailbox(
TextureMailbox(mailbox, GL_TEXTURE_2D, sync_point),
@@ -758,12 +752,10 @@ class LayerTreeHostContextTestDontUseLostResources
scoped_refptr<ContentLayer> mask = ContentLayer::Create(&client_);
mask->SetBounds(gfx::Size(10, 10));
- mask->SetAnchorPoint(gfx::PointF());
scoped_refptr<ContentLayer> content_with_mask =
ContentLayer::Create(&client_);
content_with_mask->SetBounds(gfx::Size(10, 10));
- content_with_mask->SetAnchorPoint(gfx::PointF());
content_with_mask->SetIsDrawable(true);
content_with_mask->SetMaskLayer(mask.get());
root->AddChild(content_with_mask);
@@ -771,21 +763,18 @@ class LayerTreeHostContextTestDontUseLostResources
scoped_refptr<VideoLayer> video_color =
VideoLayer::Create(&color_frame_provider_);
video_color->SetBounds(gfx::Size(10, 10));
- video_color->SetAnchorPoint(gfx::PointF());
video_color->SetIsDrawable(true);
root->AddChild(video_color);
scoped_refptr<VideoLayer> video_hw =
VideoLayer::Create(&hw_frame_provider_);
video_hw->SetBounds(gfx::Size(10, 10));
- video_hw->SetAnchorPoint(gfx::PointF());
video_hw->SetIsDrawable(true);
root->AddChild(video_hw);
scoped_refptr<VideoLayer> video_scaled_hw =
VideoLayer::Create(&scaled_hw_frame_provider_);
video_scaled_hw->SetBounds(gfx::Size(10, 10));
- video_scaled_hw->SetAnchorPoint(gfx::PointF());
video_scaled_hw->SetIsDrawable(true);
root->AddChild(video_scaled_hw);
@@ -818,7 +807,6 @@ class LayerTreeHostContextTestDontUseLostResources
// TODO(danakj): IOSurface layer can not be transported. crbug.com/239335
scoped_refptr<IOSurfaceLayer> io_surface = IOSurfaceLayer::Create();
io_surface->SetBounds(gfx::Size(10, 10));
- io_surface->SetAnchorPoint(gfx::PointF());
io_surface->SetIsDrawable(true);
io_surface->SetIOSurfaceProperties(1, gfx::Size(10, 10));
root->AddChild(io_surface);
@@ -833,7 +821,6 @@ class LayerTreeHostContextTestDontUseLostResources
PaintedScrollbarLayer::Create(
scoped_ptr<Scrollbar>(new FakeScrollbar).Pass(), content->id());
scrollbar->SetBounds(gfx::Size(10, 10));
- scrollbar->SetAnchorPoint(gfx::PointF());
scrollbar->SetIsDrawable(true);
root->AddChild(scrollbar);
@@ -929,12 +916,10 @@ class LayerTreeHostContextTestImplSidePainting
virtual void SetupTree() OVERRIDE {
scoped_refptr<Layer> root = Layer::Create();
root->SetBounds(gfx::Size(10, 10));
- root->SetAnchorPoint(gfx::PointF());
root->SetIsDrawable(true);
scoped_refptr<PictureLayer> picture = PictureLayer::Create(&client_);
picture->SetBounds(gfx::Size(10, 10));
- picture->SetAnchorPoint(gfx::PointF());
picture->SetIsDrawable(true);
root->AddChild(picture);
diff --git a/cc/trees/layer_tree_host_unittest_delegated.cc b/cc/trees/layer_tree_host_unittest_delegated.cc
index 7ef3c1f..abd5e4b 100644
--- a/cc/trees/layer_tree_host_unittest_delegated.cc
+++ b/cc/trees/layer_tree_host_unittest_delegated.cc
@@ -254,7 +254,6 @@ class LayerTreeHostDelegatedTestCaseSingleDelegatedLayer
virtual void SetupTree() OVERRIDE {
root_ = Layer::Create();
- root_->SetAnchorPoint(gfx::PointF());
root_->SetBounds(gfx::Size(15, 15));
layer_tree_host()->SetRootLayer(root_);
@@ -291,7 +290,6 @@ class LayerTreeHostDelegatedTestCaseSingleDelegatedLayer
DelegatedFrameProvider* frame_provider) {
scoped_refptr<DelegatedRendererLayer> delegated =
FakeDelegatedRendererLayer::Create(frame_provider);
- delegated->SetAnchorPoint(gfx::PointF());
delegated->SetBounds(gfx::Size(10, 10));
delegated->SetIsDrawable(true);
diff --git a/cc/trees/layer_tree_host_unittest_occlusion.cc b/cc/trees/layer_tree_host_unittest_occlusion.cc
index 352b5cf..cb6a5d3 100644
--- a/cc/trees/layer_tree_host_unittest_occlusion.cc
+++ b/cc/trees/layer_tree_host_unittest_occlusion.cc
@@ -95,8 +95,6 @@ class LayerTreeHostOcclusionTest : public LayerTreeTest {
layer->SetPosition(position);
layer->SetBounds(bounds);
layer->SetContentsOpaque(opaque);
-
- layer->SetAnchorPoint(gfx::PointF());
}
protected:
diff --git a/cc/trees/layer_tree_host_unittest_scroll.cc b/cc/trees/layer_tree_host_unittest_scroll.cc
index 6d4fb52..05a5876 100644
--- a/cc/trees/layer_tree_host_unittest_scroll.cc
+++ b/cc/trees/layer_tree_host_unittest_scroll.cc
@@ -453,7 +453,6 @@ class LayerTreeHostScrollTestCaseWithChild : public LayerTreeHostScrollTest {
root_scroll_layer_->SetBounds(gfx::Size(110, 110));
root_scroll_layer_->SetPosition(gfx::Point());
- root_scroll_layer_->SetAnchorPoint(gfx::PointF());
root_scroll_layer_->SetIsDrawable(true);
root_scroll_layer_->SetScrollClipLayerId(root_layer->id());
@@ -475,7 +474,6 @@ class LayerTreeHostScrollTestCaseWithChild : public LayerTreeHostScrollTest {
// Adjust the child layer horizontally so that scrolls will never hit it.
child_layer_->SetPosition(gfx::Point(60, 5));
}
- child_layer_->SetAnchorPoint(gfx::PointF());
child_layer_->SetIsDrawable(true);
child_layer_->SetScrollClipLayerId(root_layer->id());
@@ -1209,7 +1207,6 @@ class LayerTreeHostScrollTestLayerStructureChange
ContentLayer::Create(&fake_content_layer_client_);
scroll_layer->SetBounds(gfx::Size(110, 110));
scroll_layer->SetPosition(gfx::Point(0, 0));
- scroll_layer->SetAnchorPoint(gfx::PointF());
scroll_layer->SetIsDrawable(true);
scroll_layer->SetScrollClipLayerId(parent->id());
scroll_layer->SetBounds(gfx::Size(parent->bounds().width() + 100,
diff --git a/cc/trees/layer_tree_host_unittest_video.cc b/cc/trees/layer_tree_host_unittest_video.cc
index 1941018..5484e4c 100644
--- a/cc/trees/layer_tree_host_unittest_video.cc
+++ b/cc/trees/layer_tree_host_unittest_video.cc
@@ -25,14 +25,12 @@ class LayerTreeHostVideoTestSetNeedsDisplay
virtual void SetupTree() OVERRIDE {
scoped_refptr<Layer> root = Layer::Create();
root->SetBounds(gfx::Size(10, 10));
- root->SetAnchorPoint(gfx::PointF());
root->SetIsDrawable(true);
scoped_refptr<VideoLayer> video = VideoLayer::Create(
&video_frame_provider_);
video->SetPosition(gfx::PointF(3.f, 3.f));
video->SetBounds(gfx::Size(4, 4));
- video->SetAnchorPoint(gfx::PointF());
video->SetIsDrawable(true);
root->AddChild(video);
diff --git a/cc/trees/layer_tree_impl_unittest.cc b/cc/trees/layer_tree_impl_unittest.cc
index 4a8259e..8db2b95 100644
--- a/cc/trees/layer_tree_impl_unittest.cc
+++ b/cc/trees/layer_tree_impl_unittest.cc
@@ -48,11 +48,16 @@ TEST_F(LayerTreeImplTest, HitTestingForSingleLayer) {
LayerImpl::Create(host_impl().active_tree(), 12345);
gfx::Transform identity_matrix;
- gfx::PointF anchor;
+ gfx::Point3F transform_origin;
gfx::PointF position;
gfx::Size bounds(100, 100);
- SetLayerPropertiesForTesting(
- root.get(), identity_matrix, anchor, position, bounds, true, false);
+ SetLayerPropertiesForTesting(root.get(),
+ identity_matrix,
+ transform_origin,
+ position,
+ bounds,
+ true,
+ false);
root->SetDrawsContent(true);
host_impl().SetViewportSize(root->bounds());
@@ -95,17 +100,27 @@ TEST_F(LayerTreeImplTest, HitTestingForSingleLayerAndHud) {
HeadsUpDisplayLayerImpl::Create(host_impl().active_tree(), 11111);
gfx::Transform identity_matrix;
- gfx::PointF anchor;
+ gfx::Point3F transform_origin;
gfx::PointF position;
gfx::Size bounds(100, 100);
- SetLayerPropertiesForTesting(
- root.get(), identity_matrix, anchor, position, bounds, true, false);
+ SetLayerPropertiesForTesting(root.get(),
+ identity_matrix,
+ transform_origin,
+ position,
+ bounds,
+ true,
+ false);
root->SetDrawsContent(true);
// Create hud and add it as a child of root.
gfx::Size hud_bounds(200, 200);
- SetLayerPropertiesForTesting(
- hud.get(), identity_matrix, anchor, position, hud_bounds, true, false);
+ SetLayerPropertiesForTesting(hud.get(),
+ identity_matrix,
+ transform_origin,
+ position,
+ hud_bounds,
+ true,
+ false);
hud->SetDrawsContent(true);
host_impl().active_tree()->set_hud_layer(hud.get());
@@ -157,12 +172,12 @@ TEST_F(LayerTreeImplTest, HitTestingForUninvertibleTransform) {
ASSERT_FALSE(uninvertible_transform.IsInvertible());
gfx::Transform identity_matrix;
- gfx::PointF anchor;
+ gfx::Point3F transform_origin;
gfx::PointF position;
gfx::Size bounds(100, 100);
SetLayerPropertiesForTesting(root.get(),
uninvertible_transform,
- anchor,
+ transform_origin,
position,
bounds,
true,
@@ -221,13 +236,18 @@ TEST_F(LayerTreeImplTest, HitTestingForSinglePositionedLayer) {
LayerImpl::Create(host_impl().active_tree(), 12345);
gfx::Transform identity_matrix;
- gfx::PointF anchor;
+ gfx::Point3F transform_origin;
// this layer is positioned, and hit testing should correctly know where the
// layer is located.
gfx::PointF position(50.f, 50.f);
gfx::Size bounds(100, 100);
- SetLayerPropertiesForTesting(
- root.get(), identity_matrix, anchor, position, bounds, true, false);
+ SetLayerPropertiesForTesting(root.get(),
+ identity_matrix,
+ transform_origin,
+ position,
+ bounds,
+ true,
+ false);
root->SetDrawsContent(true);
host_impl().SetViewportSize(root->bounds());
@@ -274,12 +294,12 @@ TEST_F(LayerTreeImplTest, HitTestingForSingleRotatedLayer) {
rotation45_degrees_about_center.Translate(50.0, 50.0);
rotation45_degrees_about_center.RotateAboutZAxis(45.0);
rotation45_degrees_about_center.Translate(-50.0, -50.0);
- gfx::PointF anchor;
+ gfx::Point3F transform_origin;
gfx::PointF position;
gfx::Size bounds(100, 100);
SetLayerPropertiesForTesting(root.get(),
rotation45_degrees_about_center,
- anchor,
+ transform_origin,
position,
bounds,
true,
@@ -342,13 +362,13 @@ TEST_F(LayerTreeImplTest, HitTestingForSinglePerspectiveLayer) {
gfx::Transform translation_by_z;
translation_by_z.Translate3d(0.0, 0.0, -1.0);
- gfx::PointF anchor;
+ gfx::Point3F transform_origin;
gfx::PointF position;
gfx::Size bounds(100, 100);
SetLayerPropertiesForTesting(
root.get(),
perspective_projection_about_center * translation_by_z,
- anchor,
+ transform_origin,
position,
bounds,
true,
@@ -405,11 +425,11 @@ TEST_F(LayerTreeImplTest, HitTestingForSingleLayerWithScaledContents) {
scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl().active_tree(), 1);
gfx::Transform identity_matrix;
- gfx::PointF anchor;
+ gfx::Point3F transform_origin;
SetLayerPropertiesForTesting(root.get(),
identity_matrix,
- anchor,
+ transform_origin,
gfx::PointF(),
gfx::Size(100, 100),
true,
@@ -421,7 +441,7 @@ TEST_F(LayerTreeImplTest, HitTestingForSingleLayerWithScaledContents) {
LayerImpl::Create(host_impl().active_tree(), 12345);
SetLayerPropertiesForTesting(test_layer.get(),
identity_matrix,
- anchor,
+ transform_origin,
position,
bounds,
true,
@@ -484,12 +504,12 @@ TEST_F(LayerTreeImplTest, HitTestingForSimpleClippedLayer) {
// and not the entire layer bounds. Here we just test the simple axis-aligned
// case.
gfx::Transform identity_matrix;
- gfx::PointF anchor;
+ gfx::Point3F transform_origin;
scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl().active_tree(), 1);
SetLayerPropertiesForTesting(root.get(),
identity_matrix,
- anchor,
+ transform_origin,
gfx::PointF(),
gfx::Size(100, 100),
true,
@@ -503,7 +523,7 @@ TEST_F(LayerTreeImplTest, HitTestingForSimpleClippedLayer) {
gfx::Size bounds(50, 50);
SetLayerPropertiesForTesting(clipping_layer.get(),
identity_matrix,
- anchor,
+ transform_origin,
position,
bounds,
true,
@@ -514,8 +534,13 @@ TEST_F(LayerTreeImplTest, HitTestingForSimpleClippedLayer) {
LayerImpl::Create(host_impl().active_tree(), 456);
position = gfx::PointF(-50.f, -50.f);
bounds = gfx::Size(300, 300);
- SetLayerPropertiesForTesting(
- child.get(), identity_matrix, anchor, position, bounds, true, false);
+ SetLayerPropertiesForTesting(child.get(),
+ identity_matrix,
+ transform_origin,
+ position,
+ bounds,
+ true,
+ false);
child->SetDrawsContent(true);
clipping_layer->AddChild(child.Pass());
root->AddChild(clipping_layer.Pass());
@@ -574,11 +599,16 @@ TEST_F(LayerTreeImplTest, HitTestingForMultiClippedRotatedLayer) {
LayerImpl::Create(host_impl().active_tree(), 123);
gfx::Transform identity_matrix;
- gfx::PointF anchor;
+ gfx::Point3F transform_origin;
gfx::PointF position;
gfx::Size bounds(100, 100);
- SetLayerPropertiesForTesting(
- root.get(), identity_matrix, anchor, position, bounds, true, false);
+ SetLayerPropertiesForTesting(root.get(),
+ identity_matrix,
+ transform_origin,
+ position,
+ bounds,
+ true,
+ false);
root->SetMasksToBounds(true);
{
scoped_ptr<LayerImpl> child =
@@ -590,8 +620,13 @@ TEST_F(LayerTreeImplTest, HitTestingForMultiClippedRotatedLayer) {
position = gfx::PointF(10.f, 10.f);
bounds = gfx::Size(80, 80);
- SetLayerPropertiesForTesting(
- child.get(), identity_matrix, anchor, position, bounds, true, false);
+ SetLayerPropertiesForTesting(child.get(),
+ identity_matrix,
+ transform_origin,
+ position,
+ bounds,
+ true,
+ false);
child->SetMasksToBounds(true);
gfx::Transform rotation45_degrees_about_corner;
@@ -604,7 +639,7 @@ TEST_F(LayerTreeImplTest, HitTestingForMultiClippedRotatedLayer) {
gfx::Size(200, 200); // to ensure it covers at least sqrt(2) * 100.
SetLayerPropertiesForTesting(grand_child.get(),
rotation45_degrees_about_corner,
- anchor,
+ transform_origin,
position,
bounds,
true,
@@ -624,7 +659,7 @@ TEST_F(LayerTreeImplTest, HitTestingForMultiClippedRotatedLayer) {
bounds = gfx::Size(100, 100);
SetLayerPropertiesForTesting(rotated_leaf.get(),
rotated_leaf_transform,
- anchor,
+ transform_origin,
position,
bounds,
true,
@@ -712,12 +747,12 @@ TEST_F(LayerTreeImplTest, HitTestingForNonClippingIntermediateLayer) {
// This test checks that hit testing code does not accidentally clip to layer
// bounds for a layer that actually does not clip.
gfx::Transform identity_matrix;
- gfx::PointF anchor;
+ gfx::Point3F transform_origin;
scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl().active_tree(), 1);
SetLayerPropertiesForTesting(root.get(),
identity_matrix,
- anchor,
+ transform_origin,
gfx::PointF(),
gfx::Size(100, 100),
true,
@@ -731,7 +766,7 @@ TEST_F(LayerTreeImplTest, HitTestingForNonClippingIntermediateLayer) {
gfx::Size bounds(50, 50);
SetLayerPropertiesForTesting(intermediate_layer.get(),
identity_matrix,
- anchor,
+ transform_origin,
position,
bounds,
true,
@@ -747,8 +782,13 @@ TEST_F(LayerTreeImplTest, HitTestingForNonClippingIntermediateLayer) {
LayerImpl::Create(host_impl().active_tree(), 456);
position = gfx::PointF(60.f, 60.f); // 70, 70 in screen space
bounds = gfx::Size(20, 20);
- SetLayerPropertiesForTesting(
- child.get(), identity_matrix, anchor, position, bounds, true, false);
+ SetLayerPropertiesForTesting(child.get(),
+ identity_matrix,
+ transform_origin,
+ position,
+ bounds,
+ true,
+ false);
child->SetDrawsContent(true);
intermediate_layer->AddChild(child.Pass());
root->AddChild(intermediate_layer.Pass());
@@ -792,11 +832,16 @@ TEST_F(LayerTreeImplTest, HitTestingForMultipleLayers) {
scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl().active_tree(), 1);
gfx::Transform identity_matrix;
- gfx::PointF anchor;
+ gfx::Point3F transform_origin;
gfx::PointF position;
gfx::Size bounds(100, 100);
- SetLayerPropertiesForTesting(
- root.get(), identity_matrix, anchor, position, bounds, true, false);
+ SetLayerPropertiesForTesting(root.get(),
+ identity_matrix,
+ transform_origin,
+ position,
+ bounds,
+ true,
+ false);
root->SetDrawsContent(true);
{
// child 1 and child2 are initialized to overlap between x=50 and x=60.
@@ -814,14 +859,24 @@ TEST_F(LayerTreeImplTest, HitTestingForMultipleLayers) {
position = gfx::PointF(10.f, 10.f);
bounds = gfx::Size(50, 50);
- SetLayerPropertiesForTesting(
- child1.get(), identity_matrix, anchor, position, bounds, true, false);
+ SetLayerPropertiesForTesting(child1.get(),
+ identity_matrix,
+ transform_origin,
+ position,
+ bounds,
+ true,
+ false);
child1->SetDrawsContent(true);
position = gfx::PointF(50.f, 10.f);
bounds = gfx::Size(50, 50);
- SetLayerPropertiesForTesting(
- child2.get(), identity_matrix, anchor, position, bounds, true, false);
+ SetLayerPropertiesForTesting(child2.get(),
+ identity_matrix,
+ transform_origin,
+ position,
+ bounds,
+ true,
+ false);
child2->SetDrawsContent(true);
// Remember that grand_child is positioned with respect to its parent (i.e.
@@ -831,7 +886,7 @@ TEST_F(LayerTreeImplTest, HitTestingForMultipleLayers) {
bounds = gfx::Size(100, 50);
SetLayerPropertiesForTesting(grand_child1.get(),
identity_matrix,
- anchor,
+ transform_origin,
position,
bounds,
true,
@@ -916,11 +971,16 @@ TEST_F(LayerTreeImplTest, HitTestingForMultipleLayersAtVaryingDepths) {
scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl().active_tree(), 1);
gfx::Transform identity_matrix;
- gfx::PointF anchor;
+ gfx::Point3F transform_origin;
gfx::PointF position;
gfx::Size bounds(100, 100);
- SetLayerPropertiesForTesting(
- root.get(), identity_matrix, anchor, position, bounds, true, false);
+ SetLayerPropertiesForTesting(root.get(),
+ identity_matrix,
+ transform_origin,
+ position,
+ bounds,
+ true,
+ false);
root->SetDrawsContent(true);
root->SetShouldFlattenTransform(false);
root->SetIs3dSorted(true);
@@ -940,8 +1000,13 @@ TEST_F(LayerTreeImplTest, HitTestingForMultipleLayersAtVaryingDepths) {
position = gfx::PointF(10.f, 10.f);
bounds = gfx::Size(50, 50);
- SetLayerPropertiesForTesting(
- child1.get(), identity_matrix, anchor, position, bounds, true, false);
+ SetLayerPropertiesForTesting(child1.get(),
+ identity_matrix,
+ transform_origin,
+ position,
+ bounds,
+ true,
+ false);
child1->SetDrawsContent(true);
child1->SetShouldFlattenTransform(false);
child1->SetIs3dSorted(true);
@@ -950,8 +1015,13 @@ TEST_F(LayerTreeImplTest, HitTestingForMultipleLayersAtVaryingDepths) {
bounds = gfx::Size(50, 50);
gfx::Transform translate_z;
translate_z.Translate3d(0, 0, -10.f);
- SetLayerPropertiesForTesting(
- child2.get(), translate_z, anchor, position, bounds, true, false);
+ SetLayerPropertiesForTesting(child2.get(),
+ translate_z,
+ transform_origin,
+ position,
+ bounds,
+ true,
+ false);
child2->SetDrawsContent(true);
child2->SetShouldFlattenTransform(false);
child2->SetIs3dSorted(true);
@@ -963,7 +1033,7 @@ TEST_F(LayerTreeImplTest, HitTestingForMultipleLayersAtVaryingDepths) {
bounds = gfx::Size(100, 50);
SetLayerPropertiesForTesting(grand_child1.get(),
identity_matrix,
- anchor,
+ transform_origin,
position,
bounds,
true,
@@ -1055,11 +1125,16 @@ TEST_F(LayerTreeImplTest, HitTestingForMultipleLayerLists) {
scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl().active_tree(), 1);
gfx::Transform identity_matrix;
- gfx::PointF anchor;
+ gfx::Point3F transform_origin;
gfx::PointF position;
gfx::Size bounds(100, 100);
- SetLayerPropertiesForTesting(
- root.get(), identity_matrix, anchor, position, bounds, true, false);
+ SetLayerPropertiesForTesting(root.get(),
+ identity_matrix,
+ transform_origin,
+ position,
+ bounds,
+ true,
+ false);
root->SetDrawsContent(true);
{
// child 1 and child2 are initialized to overlap between x=50 and x=60.
@@ -1077,15 +1152,25 @@ TEST_F(LayerTreeImplTest, HitTestingForMultipleLayerLists) {
position = gfx::PointF(10.f, 10.f);
bounds = gfx::Size(50, 50);
- SetLayerPropertiesForTesting(
- child1.get(), identity_matrix, anchor, position, bounds, true, false);
+ SetLayerPropertiesForTesting(child1.get(),
+ identity_matrix,
+ transform_origin,
+ position,
+ bounds,
+ true,
+ false);
child1->SetDrawsContent(true);
child1->SetForceRenderSurface(true);
position = gfx::PointF(50.f, 10.f);
bounds = gfx::Size(50, 50);
- SetLayerPropertiesForTesting(
- child2.get(), identity_matrix, anchor, position, bounds, true, false);
+ SetLayerPropertiesForTesting(child2.get(),
+ identity_matrix,
+ transform_origin,
+ position,
+ bounds,
+ true,
+ false);
child2->SetDrawsContent(true);
child2->SetForceRenderSurface(true);
@@ -1096,7 +1181,7 @@ TEST_F(LayerTreeImplTest, HitTestingForMultipleLayerLists) {
bounds = gfx::Size(100, 50);
SetLayerPropertiesForTesting(grand_child1.get(),
identity_matrix,
- anchor,
+ transform_origin,
position,
bounds,
true,
@@ -1191,11 +1276,16 @@ TEST_F(LayerTreeImplTest, HitCheckingTouchHandlerRegionsForSingleLayer) {
gfx::Transform identity_matrix;
Region touch_handler_region(gfx::Rect(10, 10, 50, 50));
- gfx::PointF anchor;
+ gfx::Point3F transform_origin;
gfx::PointF position;
gfx::Size bounds(100, 100);
- SetLayerPropertiesForTesting(
- root.get(), identity_matrix, anchor, position, bounds, true, false);
+ SetLayerPropertiesForTesting(root.get(),
+ identity_matrix,
+ transform_origin,
+ position,
+ bounds,
+ true,
+ false);
root->SetDrawsContent(true);
host_impl().SetViewportSize(root->bounds());
@@ -1274,12 +1364,12 @@ TEST_F(LayerTreeImplTest,
gfx::Transform identity_matrix;
Region touch_handler_region(gfx::Rect(10, 10, 50, 50));
- gfx::PointF anchor;
+ gfx::Point3F transform_origin;
gfx::PointF position;
gfx::Size bounds(100, 100);
SetLayerPropertiesForTesting(root.get(),
uninvertible_transform,
- anchor,
+ transform_origin,
position,
bounds,
true,
@@ -1350,13 +1440,18 @@ TEST_F(LayerTreeImplTest,
gfx::Transform identity_matrix;
Region touch_handler_region(gfx::Rect(10, 10, 50, 50));
- gfx::PointF anchor;
+ gfx::Point3F transform_origin;
// this layer is positioned, and hit testing should correctly know where the
// layer is located.
gfx::PointF position(50.f, 50.f);
gfx::Size bounds(100, 100);
- SetLayerPropertiesForTesting(
- root.get(), identity_matrix, anchor, position, bounds, true, false);
+ SetLayerPropertiesForTesting(root.get(),
+ identity_matrix,
+ transform_origin,
+ position,
+ bounds,
+ true,
+ false);
root->SetDrawsContent(true);
root->SetTouchEventHandlerRegion(touch_handler_region);
@@ -1424,11 +1519,11 @@ TEST_F(LayerTreeImplTest,
scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl().active_tree(), 1);
gfx::Transform identity_matrix;
- gfx::PointF anchor;
+ gfx::Point3F transform_origin;
SetLayerPropertiesForTesting(root.get(),
identity_matrix,
- anchor,
+ transform_origin,
gfx::PointF(),
gfx::Size(100, 100),
true,
@@ -1441,7 +1536,7 @@ TEST_F(LayerTreeImplTest,
LayerImpl::Create(host_impl().active_tree(), 12345);
SetLayerPropertiesForTesting(test_layer.get(),
identity_matrix,
- anchor,
+ transform_origin,
position,
bounds,
true,
@@ -1528,11 +1623,11 @@ TEST_F(LayerTreeImplTest,
scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl().active_tree(), 1);
gfx::Transform identity_matrix;
- gfx::PointF anchor;
+ gfx::Point3F transform_origin;
// Set the bounds of the root layer big enough to fit the child when scaled.
SetLayerPropertiesForTesting(root.get(),
identity_matrix,
- anchor,
+ transform_origin,
gfx::PointF(),
gfx::Size(100, 100),
true,
@@ -1545,7 +1640,7 @@ TEST_F(LayerTreeImplTest,
LayerImpl::Create(host_impl().active_tree(), 12345);
SetLayerPropertiesForTesting(test_layer.get(),
identity_matrix,
- anchor,
+ transform_origin,
position,
bounds,
true,
@@ -1651,12 +1746,12 @@ TEST_F(LayerTreeImplTest, HitCheckingTouchHandlerRegionsForSimpleClippedLayer) {
// and not the entire layer bounds. Here we just test the simple axis-aligned
// case.
gfx::Transform identity_matrix;
- gfx::PointF anchor;
+ gfx::Point3F transform_origin;
scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl().active_tree(), 1);
SetLayerPropertiesForTesting(root.get(),
identity_matrix,
- anchor,
+ transform_origin,
gfx::PointF(),
gfx::Size(100, 100),
true,
@@ -1670,7 +1765,7 @@ TEST_F(LayerTreeImplTest, HitCheckingTouchHandlerRegionsForSimpleClippedLayer) {
gfx::Size bounds(50, 50);
SetLayerPropertiesForTesting(clipping_layer.get(),
identity_matrix,
- anchor,
+ transform_origin,
position,
bounds,
true,
@@ -1682,8 +1777,13 @@ TEST_F(LayerTreeImplTest, HitCheckingTouchHandlerRegionsForSimpleClippedLayer) {
Region touch_handler_region(gfx::Rect(10, 10, 50, 50));
position = gfx::PointF(-50.f, -50.f);
bounds = gfx::Size(300, 300);
- SetLayerPropertiesForTesting(
- child.get(), identity_matrix, anchor, position, bounds, true, false);
+ SetLayerPropertiesForTesting(child.get(),
+ identity_matrix,
+ transform_origin,
+ position,
+ bounds,
+ true,
+ false);
child->SetDrawsContent(true);
child->SetTouchEventHandlerRegion(touch_handler_region);
clipping_layer->AddChild(child.Pass());
@@ -1741,12 +1841,12 @@ TEST_F(LayerTreeImplTest, HitCheckingTouchHandlerRegionsForSimpleClippedLayer) {
TEST_F(LayerTreeImplTest, HitCheckingTouchHandlerOverlappingRegions) {
gfx::Transform identity_matrix;
- gfx::PointF anchor;
+ gfx::Point3F transform_origin;
scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl().active_tree(), 1);
SetLayerPropertiesForTesting(root.get(),
identity_matrix,
- anchor,
+ transform_origin,
gfx::PointF(),
gfx::Size(100, 100),
true,
@@ -1760,7 +1860,7 @@ TEST_F(LayerTreeImplTest, HitCheckingTouchHandlerOverlappingRegions) {
gfx::Size bounds(50, 50);
SetLayerPropertiesForTesting(touch_layer.get(),
identity_matrix,
- anchor,
+ transform_origin,
position,
bounds,
true,
@@ -1779,7 +1879,7 @@ TEST_F(LayerTreeImplTest, HitCheckingTouchHandlerOverlappingRegions) {
gfx::Size bounds(50, 50);
SetLayerPropertiesForTesting(notouch_layer.get(),
identity_matrix,
- anchor,
+ transform_origin,
position,
bounds,
true,
diff --git a/cc/trees/occlusion_tracker_unittest.cc b/cc/trees/occlusion_tracker_unittest.cc
index 4687dab..6ce2781 100644
--- a/cc/trees/occlusion_tracker_unittest.cc
+++ b/cc/trees/occlusion_tracker_unittest.cc
@@ -393,7 +393,6 @@ template <typename Types> class OcclusionTrackerTest : public testing::Test {
const gfx::PointF& position,
const gfx::Size& bounds) {
layer->SetTransform(transform);
- layer->SetAnchorPoint(gfx::PointF());
layer->SetPosition(position);
layer->SetBounds(bounds);
}