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

Unified Diff: cc/layers/layer_position_constraint_unittest.cc

Issue 465853004: Moving RenderSurface creation outside of CalcDrawProps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated unit tests Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: cc/layers/layer_position_constraint_unittest.cc
diff --git a/cc/layers/layer_position_constraint_unittest.cc b/cc/layers/layer_position_constraint_unittest.cc
index 478121b31bd17996478efa1968cd9df7da11c836..e745c1a5f6f788226166a4ff5c5a2692727aa394 100644
--- a/cc/layers/layer_position_constraint_unittest.cc
+++ b/cc/layers/layer_position_constraint_unittest.cc
@@ -84,6 +84,7 @@ class LayerPositionConstraintTest : public testing::Test {
scoped_ptr<LayerImpl> great_grand_child =
LayerImpl::Create(host_impl_.active_tree(), 4);
+ root->CreateRenderSurface();
gfx::Transform IdentityMatrix;
gfx::Point3F transform_origin;
gfx::PointF position;
@@ -599,7 +600,7 @@ TEST_F(LayerPositionConstraintTest,
child->SetIsContainerForFixedPositionLayers(true);
grand_child->SetPosition(gfx::PointF(8.f, 6.f));
- grand_child->SetForceRenderSurface(true);
+ grand_child->CreateRenderSurface();
great_grand_child->SetPositionConstraint(fixed_to_top_left_);
great_grand_child->SetDrawsContent(true);
@@ -739,9 +740,9 @@ TEST_F(LayerPositionConstraintTest,
// Actually set up the scenario here.
child->SetIsContainerForFixedPositionLayers(true);
grand_child->SetPosition(gfx::PointF(8.f, 6.f));
- grand_child->SetForceRenderSurface(true);
+ grand_child->CreateRenderSurface();
great_grand_child->SetPosition(gfx::PointF(40.f, 60.f));
- great_grand_child->SetForceRenderSurface(true);
+ great_grand_child->CreateRenderSurface();
fixed_position_child->SetPositionConstraint(fixed_to_top_left_);
fixed_position_child->SetDrawsContent(true);
@@ -907,7 +908,7 @@ TEST_F(LayerPositionConstraintTest,
LayerImpl* grand_child = child->children()[0];
child->SetIsContainerForFixedPositionLayers(true);
- child->SetForceRenderSurface(true);
+ child->CreateRenderSurface();
grand_child->SetPositionConstraint(fixed_to_top_left_);
grand_child->SetDrawsContent(true);

Powered by Google App Engine
This is Rietveld 408576698