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

Unified Diff: cc/trees/layer_tree_host_common_unittest.cc

Issue 1850493002: cc : Remove parent for mask and replica layers in LayerImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/damage_tracker_unittest.cc ('k') | cc/trees/occlusion_tracker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_common_unittest.cc
diff --git a/cc/trees/layer_tree_host_common_unittest.cc b/cc/trees/layer_tree_host_common_unittest.cc
index 69ae0ba198e37dffa141a54f1b4f41997ceb0ca8..63742582427514fc9f593776288b195fb02a1a21 100644
--- a/cc/trees/layer_tree_host_common_unittest.cc
+++ b/cc/trees/layer_tree_host_common_unittest.cc
@@ -820,6 +820,9 @@ TEST_F(LayerTreeHostCommonTest, TransformsForRenderSurfaceHierarchy) {
gfx::Point3F(2.5f, 0.f, 0.f), gfx::PointF(),
gfx::Size(), true, false, false);
+ // We need to set parent on replica layers for property tree building.
+ replica_of_rs1->SetParent(render_surface1);
+ replica_of_rs2->SetParent(render_surface2);
render_surface1->SetReplicaLayer(std::move(replica_of_rs1));
render_surface2->SetReplicaLayer(std::move(replica_of_rs2));
ExecuteCalculateDrawProperties(root);
@@ -4941,6 +4944,8 @@ TEST_F(LayerTreeHostCommonTest, RenderSurfaceTransformsInHighDPI) {
SetLayerPropertiesForTesting(replica.get(), replica_transform, gfx::Point3F(),
gfx::PointF(2.f, 2.f), gfx::Size(10, 10), false,
true, false);
+ // We need to set parent on replica layer for property tree building.
+ replica->SetParent(child);
child->SetReplicaLayer(std::move(replica));
// This layer should end up in the same surface as child, with the same draw
« no previous file with comments | « cc/trees/damage_tracker_unittest.cc ('k') | cc/trees/occlusion_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698