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

Unified Diff: cc/layers/texture_layer_unittest.cc

Issue 2253143002: Revert of cc: Move data to LayerTree from LayerTreeHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@layer_tree_change
Patch Set: 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/layers/surface_layer_unittest.cc ('k') | cc/output/delegating_renderer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/texture_layer_unittest.cc
diff --git a/cc/layers/texture_layer_unittest.cc b/cc/layers/texture_layer_unittest.cc
index 9454055474f15442cdc8041d2497e16afc835fe6..eaf59bb3e1329d28d4d50b11684821712d7855ef 100644
--- a/cc/layers/texture_layer_unittest.cc
+++ b/cc/layers/texture_layer_unittest.cc
@@ -220,9 +220,8 @@
void SetUp() override {
layer_tree_host_ =
MockLayerTreeHost::Create(&fake_client_, &task_graph_runner_);
- layer_tree_ = layer_tree_host_->GetLayerTree();
EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times(AnyNumber());
- layer_tree_->SetViewportSize(gfx::Size(10, 10));
+ layer_tree_host_->SetViewportSize(gfx::Size(10, 10));
Mock::VerifyAndClearExpectations(layer_tree_host_.get());
}
@@ -230,12 +229,11 @@
Mock::VerifyAndClearExpectations(layer_tree_host_.get());
EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times(AnyNumber());
- layer_tree_->SetRootLayer(nullptr);
+ layer_tree_host_->SetRootLayer(nullptr);
layer_tree_host_ = nullptr;
}
std::unique_ptr<MockLayerTreeHost> layer_tree_host_;
- LayerTree* layer_tree_;
FakeImplTaskRunnerProvider task_runner_provider_;
FakeLayerTreeHostClient fake_client_;
TestSharedBitmapManager shared_bitmap_manager_;
@@ -248,7 +246,7 @@
TEST_F(TextureLayerTest, CheckPropertyChangeCausesCorrectBehavior) {
scoped_refptr<TextureLayer> test_layer =
TextureLayer::CreateForMailbox(nullptr);
- EXPECT_SET_NEEDS_COMMIT(1, layer_tree_->SetRootLayer(test_layer));
+ EXPECT_SET_NEEDS_COMMIT(1, layer_tree_host_->SetRootLayer(test_layer));
// Test properties that should call SetNeedsCommit. All properties need to
// be set to new values in order for SetNeedsCommit to be called.
@@ -288,7 +286,7 @@
ASSERT_TRUE(test_layer.get());
EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times(AnyNumber());
- layer_tree_->SetRootLayer(test_layer);
+ layer_tree_host_->SetRootLayer(test_layer);
Mock::VerifyAndClearExpectations(layer_tree_host_.get());
EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times(AtLeast(1));
@@ -690,8 +688,8 @@
layer_->SetBounds(bounds);
root_->AddChild(layer_);
- layer_tree()->SetRootLayer(root_);
- layer_tree()->SetViewportSize(bounds);
+ layer_tree_host()->SetRootLayer(root_);
+ layer_tree_host()->SetViewportSize(bounds);
SetMailbox('1');
EXPECT_EQ(0, callback_count_);
@@ -791,8 +789,8 @@
layer_->SetBounds(bounds);
root_->AddChild(layer_);
- layer_tree()->SetRootLayer(root_);
- layer_tree()->SetViewportSize(bounds);
+ layer_tree_host()->SetRootLayer(root_);
+ layer_tree_host()->SetViewportSize(bounds);
SetMailbox('1');
PostSetNeedsCommitToMainThread();
@@ -852,7 +850,6 @@
TextureLayerTest::SetUp();
layer_tree_host_ =
MockLayerTreeHost::Create(&fake_client_, &task_graph_runner_);
- layer_tree_ = layer_tree_host_->GetLayerTree();
host_impl_.SetVisible(true);
EXPECT_TRUE(host_impl_.InitializeRenderer(output_surface_.get()));
}
@@ -1083,7 +1080,7 @@
texture_layer_->SetIsDrawable(true);
root->AddChild(texture_layer_);
- layer_tree()->SetRootLayer(root);
+ layer_tree_host()->SetRootLayer(root);
LayerTreeTest::SetupTree();
}
@@ -1175,7 +1172,7 @@
texture_layer_->SetIsDrawable(true);
parent_layer_->AddChild(texture_layer_);
- layer_tree()->SetRootLayer(root);
+ layer_tree_host()->SetRootLayer(root);
LayerTreeTest::SetupTree();
}
@@ -1273,7 +1270,7 @@
texture_layer->SetBounds(gfx::Size(10, 10));
texture_layer->SetIsDrawable(true);
- layer_tree()->root_layer()->AddChild(texture_layer);
+ layer_tree_host()->root_layer()->AddChild(texture_layer);
texture_layer_id_ = texture_layer->id();
}
@@ -1347,8 +1344,8 @@
layer_->SetBounds(bounds);
root_->AddChild(layer_);
- layer_tree()->SetRootLayer(root_);
- layer_tree()->SetViewportSize(bounds);
+ layer_tree_host()->SetRootLayer(root_);
+ layer_tree_host()->SetViewportSize(bounds);
}
void BeginTest() override {
@@ -1417,8 +1414,8 @@
layer_->SetBounds(bounds);
root_->AddChild(layer_);
- layer_tree()->SetRootLayer(root_);
- layer_tree()->SetViewportSize(bounds);
+ layer_tree_host()->SetRootLayer(root_);
+ layer_tree_host()->SetViewportSize(bounds);
}
void BeginTest() override {
« no previous file with comments | « cc/layers/surface_layer_unittest.cc ('k') | cc/output/delegating_renderer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698