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

Unified Diff: cc/layers/picture_layer_unittest.cc

Issue 2661523003: cc: Merge LayerTree into the LayerTreeHost. (Closed)
Patch Set: auto Created 3 years, 11 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/picture_layer.cc ('k') | cc/layers/scrollbar_layer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/picture_layer_unittest.cc
diff --git a/cc/layers/picture_layer_unittest.cc b/cc/layers/picture_layer_unittest.cc
index a4199c4b82c9565cd1a8b4e1881ee7b2503ec263..a7b24b6c233c81ed4cc71242c88e1b9baa913b6a 100644
--- a/cc/layers/picture_layer_unittest.cc
+++ b/cc/layers/picture_layer_unittest.cc
@@ -43,7 +43,7 @@ TEST(PictureLayerTest, NoTilesIfEmptyBounds) {
auto animation_host = AnimationHost::CreateForTesting(ThreadInstance::MAIN);
std::unique_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create(
&host_client, &task_graph_runner, animation_host.get());
- host->GetLayerTree()->SetRootLayer(layer);
+ host->SetRootLayer(layer);
layer->SetIsDrawable(true);
layer->SavePaintProperties();
layer->Update();
@@ -87,7 +87,7 @@ TEST(PictureLayerTest, InvalidateRasterAfterUpdate) {
auto animation_host = AnimationHost::CreateForTesting(ThreadInstance::MAIN);
std::unique_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create(
&host_client, &task_graph_runner, animation_host.get());
- host->GetLayerTree()->SetRootLayer(layer);
+ host->SetRootLayer(layer);
layer->SetIsDrawable(true);
layer->SavePaintProperties();
@@ -131,7 +131,7 @@ TEST(PictureLayerTest, InvalidateRasterWithoutUpdate) {
auto animation_host = AnimationHost::CreateForTesting(ThreadInstance::MAIN);
std::unique_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create(
&host_client, &task_graph_runner, animation_host.get());
- host->GetLayerTree()->SetRootLayer(layer);
+ host->SetRootLayer(layer);
layer->SetIsDrawable(true);
layer->SavePaintProperties();
@@ -175,7 +175,7 @@ TEST(PictureLayerTest, ClearVisibleRectWhenNoTiling) {
auto animation_host = AnimationHost::CreateForTesting(ThreadInstance::MAIN);
std::unique_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create(
&host_client, &task_graph_runner, animation_host.get());
- host->GetLayerTree()->SetRootLayer(layer);
+ host->SetRootLayer(layer);
layer->SetIsDrawable(true);
layer->SavePaintProperties();
layer->Update();
@@ -257,7 +257,7 @@ TEST(PictureLayerTest, SuitableForGpuRasterization) {
auto animation_host = AnimationHost::CreateForTesting(ThreadInstance::MAIN);
std::unique_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create(
&host_client, &task_graph_runner, animation_host.get());
- host->GetLayerTree()->SetRootLayer(layer);
+ host->SetRootLayer(layer);
// Update layers to initialize the recording source.
gfx::Size layer_bounds(200, 200);
@@ -329,7 +329,7 @@ TEST(PictureLayerTest, NonMonotonicSourceFrameNumber) {
host_client2.SetLayerTreeHost(host2.get());
// The PictureLayer is put in one LayerTreeHost.
- host1->GetLayerTree()->SetRootLayer(layer);
+ host1->SetRootLayer(layer);
// Do a main frame, record the picture layers.
EXPECT_EQ(0, layer->update_count());
layer->SetNeedsDisplay();
@@ -344,8 +344,8 @@ TEST(PictureLayerTest, NonMonotonicSourceFrameNumber) {
EXPECT_EQ(2, host1->SourceFrameNumber());
// Then moved to another LayerTreeHost.
- host1->GetLayerTree()->SetRootLayer(nullptr);
- host2->GetLayerTree()->SetRootLayer(layer);
+ host1->SetRootLayer(nullptr);
+ host2->SetRootLayer(layer);
// Do a main frame, record the picture layers. The frame number has changed
// non-monotonically.
« no previous file with comments | « cc/layers/picture_layer.cc ('k') | cc/layers/scrollbar_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698