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

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: Rebase on another LTH refactor CL. 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
« no previous file with comments | « cc/trees/layer_tree_host_common.cc ('k') | cc/trees/layer_tree_host_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 67cb90306aa20f7979b04677d48969d7045352a9..956a73f1b1e663947520043b5b6107bf677421fc 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) {
@@ -8322,7 +8323,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());
@@ -9433,7 +9434,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);
@@ -9482,7 +9483,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);
« no previous file with comments | « cc/trees/layer_tree_host_common.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698