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

Unified Diff: cc/trees/layer_tree_host_common_unittest.cc

Issue 2216203002: Refactor MutatorHostClient from LayerTreeHost to LayerTree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes according to code review. Created 4 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/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 654622bc4c2af00937350edf0828be970b5bb976..5d5d37267fc0890710a4d6fcf8a4f40b2d5b0e0a 100644
--- a/cc/trees/layer_tree_host_common_unittest.cc
+++ b/cc/trees/layer_tree_host_common_unittest.cc
@@ -203,7 +203,7 @@ class LayerTreeHostCommonTestBase : public LayerTestCommon::LayerImplTest {
draw_property_utils::UpdatePropertyTrees(property_trees,
can_render_to_separate_surface);
draw_property_utils::FindLayersThatNeedUpdates(
- root_layer->layer_tree_host(), property_trees->transform_tree,
+ root_layer->GetLayerTree(), property_trees->transform_tree,
property_trees->effect_tree, &update_layer_list_);
}
@@ -4877,12 +4877,13 @@ TEST_F(LayerTreeHostCommonTest, LayerSearch) {
host()->SetRootLayer(root);
int nonexistent_id = -1;
- EXPECT_EQ(root.get(), host()->LayerById(root->id()));
- EXPECT_EQ(child.get(), host()->LayerById(child->id()));
- EXPECT_EQ(grand_child.get(), host()->LayerById(grand_child->id()));
- EXPECT_EQ(mask_layer.get(), host()->LayerById(mask_layer->id()));
- EXPECT_EQ(replica_layer.get(), host()->LayerById(replica_layer->id()));
- EXPECT_FALSE(host()->LayerById(nonexistent_id));
+ LayerTree* layer_tree = host()->GetLayerTree();
+ EXPECT_EQ(root.get(), layer_tree->LayerById(root->id()));
+ EXPECT_EQ(child.get(), layer_tree->LayerById(child->id()));
+ EXPECT_EQ(grand_child.get(), layer_tree->LayerById(grand_child->id()));
+ EXPECT_EQ(mask_layer.get(), layer_tree->LayerById(mask_layer->id()));
+ EXPECT_EQ(replica_layer.get(), layer_tree->LayerById(replica_layer->id()));
+ EXPECT_FALSE(layer_tree->LayerById(nonexistent_id));
}
TEST_F(LayerTreeHostCommonTest, TransparentChildRenderSurfaceCreation) {
@@ -8323,7 +8324,7 @@ TEST_F(LayerTreeHostCommonTest, SkippingSubtreeMain) {
child->AddChild(grandchild);
grandchild->AddChild(greatgrandchild);
host()->SetRootLayer(root);
- host()->SetElementIdsForTesting();
+ host()->GetLayerTree()->SetElementIdsForTesting();
// Check the non-skipped case.
ExecuteCalculateDrawPropertiesWithPropertyTrees(root.get());
@@ -9430,7 +9431,7 @@ TEST_F(LayerTreeHostCommonTest, OpacityAnimationsTrackingTest) {
make_scoped_refptr(new LayerWithForcedDrawsContent());
root->AddChild(animated);
host()->SetRootLayer(root);
- host()->SetElementIdsForTesting();
+ host()->GetLayerTree()->SetElementIdsForTesting();
root->SetBounds(gfx::Size(100, 100));
root->SetForceRenderSurfaceForTesting(true);
@@ -9479,7 +9480,7 @@ TEST_F(LayerTreeHostCommonTest, TransformAnimationsTrackingTest) {
make_scoped_refptr(new LayerWithForcedDrawsContent());
root->AddChild(animated);
host()->SetRootLayer(root);
- host()->SetElementIdsForTesting();
+ host()->GetLayerTree()->SetElementIdsForTesting();
root->SetBounds(gfx::Size(100, 100));
root->SetForceRenderSurfaceForTesting(true);

Powered by Google App Engine
This is Rietveld 408576698