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

Unified Diff: cc/layers/picture_layer_unittest.cc

Issue 2183403002: cc: Move data to LayerTree from LayerTreeHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@layer_tree_change
Patch Set: remove unused test file. 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/layers/picture_layer_unittest.cc
diff --git a/cc/layers/picture_layer_unittest.cc b/cc/layers/picture_layer_unittest.cc
index 4a2de8a4e62fc720785e0778a2c6dd477bdbbc60..e88e0675936837d21311c7ceb516b71ae0f68732 100644
--- a/cc/layers/picture_layer_unittest.cc
+++ b/cc/layers/picture_layer_unittest.cc
@@ -80,7 +80,7 @@ class TestSerializationPictureLayer : public PictureLayer {
scoped_refptr<TestSerializationPictureLayer> layer =
TestSerializationPictureLayer::Create(recording_source_viewport_);
- host->SetRootLayer(layer);
+ host->GetLayerTree()->SetRootLayer(layer);
layer->FromLayerSpecificPropertiesProto(proto);
@@ -161,7 +161,7 @@ TEST(PictureLayerTest, TestSetAllPropsSerializationDeserialization) {
gfx::Size recording_source_viewport(256, 256);
scoped_refptr<TestSerializationPictureLayer> layer =
TestSerializationPictureLayer::Create(recording_source_viewport);
- host->SetRootLayer(layer);
+ host->GetLayerTree()->SetRootLayer(layer);
Region region(gfx::Rect(14, 15, 16, 17));
layer->set_invalidation(region);
@@ -194,7 +194,7 @@ TEST(PictureLayerTest, TestSerializationDeserialization) {
gfx::Size recording_source_viewport(256, 256);
scoped_refptr<TestSerializationPictureLayer> layer =
TestSerializationPictureLayer::Create(recording_source_viewport);
- host->SetRootLayer(layer);
+ host->GetLayerTree()->SetRootLayer(layer);
layer->SetBounds(recording_source_viewport);
layer->set_update_source_frame_number(0);
@@ -222,7 +222,7 @@ TEST(PictureLayerTest, TestEmptySerializationDeserialization) {
gfx::Size recording_source_viewport(256, 256);
scoped_refptr<TestSerializationPictureLayer> layer =
TestSerializationPictureLayer::Create(recording_source_viewport);
- host->SetRootLayer(layer);
+ host->GetLayerTree()->SetRootLayer(layer);
layer->ValidateSerialization(fake_image_serialization_processor.get(),
host.get());
}
@@ -236,7 +236,7 @@ TEST(PictureLayerTest, NoTilesIfEmptyBounds) {
TestTaskGraphRunner task_graph_runner;
std::unique_ptr<FakeLayerTreeHost> host =
FakeLayerTreeHost::Create(&host_client, &task_graph_runner);
- host->SetRootLayer(layer);
+ host->GetLayerTree()->SetRootLayer(layer);
layer->SetIsDrawable(true);
layer->SavePaintProperties();
layer->Update();
@@ -281,7 +281,7 @@ TEST(PictureLayerTest, InvalidateRasterAfterUpdate) {
TestTaskGraphRunner task_graph_runner;
std::unique_ptr<FakeLayerTreeHost> host =
FakeLayerTreeHost::Create(&host_client, &task_graph_runner);
- host->SetRootLayer(layer);
+ host->GetLayerTree()->SetRootLayer(layer);
layer->SetIsDrawable(true);
layer->SavePaintProperties();
@@ -326,7 +326,7 @@ TEST(PictureLayerTest, InvalidateRasterWithoutUpdate) {
TestTaskGraphRunner task_graph_runner;
std::unique_ptr<FakeLayerTreeHost> host =
FakeLayerTreeHost::Create(&host_client, &task_graph_runner);
- host->SetRootLayer(layer);
+ host->GetLayerTree()->SetRootLayer(layer);
layer->SetIsDrawable(true);
layer->SavePaintProperties();
@@ -371,7 +371,7 @@ TEST(PictureLayerTest, ClearVisibleRectWhenNoTiling) {
TestTaskGraphRunner task_graph_runner;
std::unique_ptr<FakeLayerTreeHost> host =
FakeLayerTreeHost::Create(&host_client, &task_graph_runner);
- host->SetRootLayer(layer);
+ host->GetLayerTree()->SetRootLayer(layer);
layer->SetIsDrawable(true);
layer->SavePaintProperties();
layer->Update();
@@ -453,7 +453,7 @@ TEST(PictureLayerTest, SuitableForGpuRasterization) {
TestTaskGraphRunner task_graph_runner;
std::unique_ptr<FakeLayerTreeHost> host =
FakeLayerTreeHost::Create(&host_client, &task_graph_runner);
- host->SetRootLayer(layer);
+ host->GetLayerTree()->SetRootLayer(layer);
// Update layers to initialize the recording source.
gfx::Size layer_bounds(200, 200);
@@ -525,7 +525,7 @@ TEST(PictureLayerTest, NonMonotonicSourceFrameNumber) {
host_client2.SetLayerTreeHost(host2.get());
// The PictureLayer is put in one LayerTreeHost.
- host1->SetRootLayer(layer);
+ host1->GetLayerTree()->SetRootLayer(layer);
// Do a main frame, record the picture layers.
EXPECT_EQ(0, layer->update_count());
layer->SetNeedsDisplay();
@@ -540,8 +540,8 @@ TEST(PictureLayerTest, NonMonotonicSourceFrameNumber) {
EXPECT_EQ(2, host1->source_frame_number());
// Then moved to another LayerTreeHost.
- host1->SetRootLayer(nullptr);
- host2->SetRootLayer(layer);
+ host1->GetLayerTree()->SetRootLayer(nullptr);
+ host2->GetLayerTree()->SetRootLayer(layer);
// Do a main frame, record the picture layers. The frame number has changed
// non-monotonically.

Powered by Google App Engine
This is Rietveld 408576698