| Index: cc/layers/scrollbar_layer_unittest.cc
|
| diff --git a/cc/layers/scrollbar_layer_unittest.cc b/cc/layers/scrollbar_layer_unittest.cc
|
| index 82a29c4d4ec1df6d2049052edde55d3bb75feb0c..2cc8c05f24a04d54f7e50af4f4fb8c0500f06bd8 100644
|
| --- a/cc/layers/scrollbar_layer_unittest.cc
|
| +++ b/cc/layers/scrollbar_layer_unittest.cc
|
| @@ -131,7 +131,6 @@ class ScrollbarLayerTest : public testing::Test {
|
| std::move(fake_ui_resource_manager));
|
| layer_tree_host_->InitializeSingleThreaded(
|
| &single_thread_client_, base::ThreadTaskRunnerHandle::Get());
|
| - layer_tree_ = layer_tree_host_->GetLayerTree();
|
| layer_tree_host_->SetVisible(true);
|
| fake_client_.SetLayerTreeHost(layer_tree_host_.get());
|
| }
|
| @@ -171,7 +170,6 @@ class ScrollbarLayerTest : public testing::Test {
|
| LayerTreeSettings layer_tree_settings_;
|
| std::unique_ptr<AnimationHost> animation_host_;
|
| std::unique_ptr<FakeLayerTreeHost> layer_tree_host_;
|
| - LayerTree* layer_tree_;
|
| int scrollbar_layer_id_;
|
| };
|
|
|
| @@ -233,7 +231,7 @@ TEST_F(ScrollbarLayerTest, ScrollOffsetSynchronization) {
|
| scroll_layer->SetBounds(gfx::Size(100, 200));
|
| content_layer->SetBounds(gfx::Size(100, 200));
|
|
|
| - layer_tree_->SetRootLayer(layer_tree_root);
|
| + layer_tree_host_->SetRootLayer(layer_tree_root);
|
| layer_tree_root->AddChild(scroll_layer);
|
| scroll_layer->AddChild(content_layer);
|
| layer_tree_root->AddChild(scrollbar_layer);
|
| @@ -301,7 +299,7 @@ TEST_F(ScrollbarLayerTest, UpdatePropertiesOfScrollBarWhenThumbRemoved) {
|
| root_layer->SetBounds(gfx::Size(100, 50));
|
| content_layer->SetBounds(gfx::Size(100, 50));
|
|
|
| - layer_tree_->SetRootLayer(root_clip_layer);
|
| + layer_tree_host_->SetRootLayer(root_clip_layer);
|
| root_clip_layer->AddChild(root_layer);
|
| root_layer->AddChild(content_layer);
|
| root_layer->AddChild(scrollbar_layer);
|
| @@ -340,7 +338,7 @@ TEST_F(ScrollbarLayerTest, ThumbRect) {
|
| root_layer->SetBounds(gfx::Size(100, 50));
|
| content_layer->SetBounds(gfx::Size(100, 50));
|
|
|
| - layer_tree_->SetRootLayer(root_clip_layer);
|
| + layer_tree_host_->SetRootLayer(root_clip_layer);
|
| root_clip_layer->AddChild(root_layer);
|
| root_layer->AddChild(content_layer);
|
| root_layer->AddChild(scrollbar_layer);
|
| @@ -415,7 +413,7 @@ TEST_F(ScrollbarLayerTest, ThumbRectForOverlayLeftSideVerticalScrollbar) {
|
| root_clip_layer->SetBounds(gfx::Size(50, 20));
|
| root_layer->SetBounds(gfx::Size(50, 100));
|
|
|
| - layer_tree_->SetRootLayer(root_clip_layer);
|
| + layer_tree_host_->SetRootLayer(root_clip_layer);
|
| root_clip_layer->AddChild(root_layer);
|
| root_layer->AddChild(scrollbar_layer);
|
|
|
| @@ -535,7 +533,7 @@ TEST_F(ScrollbarLayerTest, LayerDrivenSolidColorDrawQuads) {
|
| scroll_layer->AddChild(child1);
|
| scroll_layer->InsertChild(child2, 1);
|
| layer_tree_root->AddChild(scroll_layer);
|
| - layer_tree_->SetRootLayer(layer_tree_root);
|
| + layer_tree_host_->SetRootLayer(layer_tree_root);
|
|
|
| // Choose layer bounds to give max_scroll_offset = (8, 8).
|
| layer_tree_root->SetBounds(gfx::Size(2, 2));
|
| @@ -588,7 +586,7 @@ TEST_F(ScrollbarLayerTest, ScrollbarLayerOpacity) {
|
| scroll_layer->AddChild(child1);
|
| scroll_layer->InsertChild(scrollbar_layer, 1);
|
| layer_tree_root->AddChild(scroll_layer);
|
| - layer_tree_->SetRootLayer(layer_tree_root);
|
| + layer_tree_host_->SetRootLayer(layer_tree_root);
|
|
|
| // Choose layer bounds to give max_scroll_offset = (8, 8).
|
| layer_tree_root->SetBounds(gfx::Size(2, 2));
|
| @@ -597,18 +595,18 @@ TEST_F(ScrollbarLayerTest, ScrollbarLayerOpacity) {
|
| // Building property trees twice shouldn't change the size of
|
| // PropertyTrees::always_use_active_tree_opacity_effect_ids.
|
| layer_tree_host_->BuildPropertyTreesForTesting();
|
| - EXPECT_EQ(layer_tree_->property_trees()
|
| + EXPECT_EQ(layer_tree_host_->property_trees()
|
| ->always_use_active_tree_opacity_effect_ids.size(),
|
| 1u);
|
| - layer_tree_->property_trees()->needs_rebuild = true;
|
| + layer_tree_host_->property_trees()->needs_rebuild = true;
|
| layer_tree_host_->BuildPropertyTreesForTesting();
|
| - EXPECT_EQ(layer_tree_->property_trees()
|
| + EXPECT_EQ(layer_tree_host_->property_trees()
|
| ->always_use_active_tree_opacity_effect_ids.size(),
|
| 1u);
|
|
|
| // A solid color scrollbar layer's opacity is initialized to 0 on main thread
|
| layer_tree_host_->UpdateLayers();
|
| - EffectNode* node = layer_tree_->property_trees()->effect_tree.Node(
|
| + EffectNode* node = layer_tree_host_->property_trees()->effect_tree.Node(
|
| scrollbar_layer->effect_tree_index());
|
| EXPECT_EQ(node->opacity, 0.f);
|
|
|
| @@ -671,7 +669,7 @@ TEST_F(ScrollbarLayerTest, ScrollbarLayerPushProperties) {
|
| scroll_layer->AddChild(child1);
|
| scroll_layer->InsertChild(scrollbar_layer, 1);
|
| layer_tree_root->AddChild(scroll_layer);
|
| - layer_tree_->SetRootLayer(layer_tree_root);
|
| + layer_tree_host_->SetRootLayer(layer_tree_root);
|
|
|
| layer_tree_root->SetBounds(gfx::Size(2, 2));
|
| scroll_layer->SetBounds(gfx::Size(10, 10));
|
| @@ -822,7 +820,7 @@ class ScrollbarLayerTestResourceCreationAndRelease : public ScrollbarLayerTest {
|
| layer_tree_root->AddChild(content_layer);
|
| layer_tree_root->AddChild(scrollbar_layer);
|
|
|
| - layer_tree_->SetRootLayer(layer_tree_root);
|
| + layer_tree_host_->SetRootLayer(layer_tree_root);
|
|
|
| scrollbar_layer->SetIsDrawable(true);
|
| scrollbar_layer->SetBounds(gfx::Size(100, 100));
|
| @@ -881,7 +879,7 @@ TEST_F(ScrollbarLayerTestResourceCreationAndRelease, TestResourceUpdate) {
|
| layer_tree_root->AddChild(content_layer);
|
| layer_tree_root->AddChild(scrollbar_layer);
|
|
|
| - layer_tree_->SetRootLayer(layer_tree_root);
|
| + layer_tree_host_->SetRootLayer(layer_tree_root);
|
|
|
| scrollbar_layer->SetIsDrawable(true);
|
| scrollbar_layer->SetBounds(gfx::Size(100, 15));
|
| @@ -1041,7 +1039,7 @@ class ScaledScrollbarLayerTestResourceCreation : public ScrollbarLayerTest {
|
| layer_tree_root->AddChild(content_layer);
|
| layer_tree_root->AddChild(scrollbar_layer);
|
|
|
| - layer_tree_->SetRootLayer(layer_tree_root);
|
| + layer_tree_host_->SetRootLayer(layer_tree_root);
|
|
|
| scrollbar_layer->SetIsDrawable(true);
|
| scrollbar_layer->SetBounds(gfx::Size(100, 15));
|
| @@ -1054,7 +1052,7 @@ class ScaledScrollbarLayerTestResourceCreation : public ScrollbarLayerTest {
|
| EXPECT_EQ(scrollbar_layer->GetLayerTreeHostForTesting(),
|
| layer_tree_host_.get());
|
|
|
| - layer_tree_->SetDeviceScaleFactor(test_scale);
|
| + layer_tree_host_->SetDeviceScaleFactor(test_scale);
|
|
|
| scrollbar_layer->SavePaintProperties();
|
| scrollbar_layer->Update();
|
| @@ -1110,7 +1108,7 @@ class ScaledScrollbarLayerTestScaledRasterization : public ScrollbarLayerTest {
|
|
|
| layer_tree_root->AddChild(scrollbar_layer);
|
|
|
| - layer_tree_->SetRootLayer(layer_tree_root);
|
| + layer_tree_host_->SetRootLayer(layer_tree_root);
|
|
|
| scrollbar_layer->SetBounds(scrollbar_rect.size());
|
| scrollbar_layer->SetPosition(gfx::PointF(scrollbar_rect.origin()));
|
| @@ -1118,7 +1116,7 @@ class ScaledScrollbarLayerTestScaledRasterization : public ScrollbarLayerTest {
|
| scrollbar_layer->fake_scrollbar()->set_track_rect(scrollbar_rect);
|
| scrollbar_layer->set_visible_layer_rect(scrollbar_rect);
|
|
|
| - layer_tree_->SetDeviceScaleFactor(test_scale);
|
| + layer_tree_host_->SetDeviceScaleFactor(test_scale);
|
|
|
| gfx::Rect screen_space_clip_rect;
|
| scrollbar_layer->SavePaintProperties();
|
|
|