| Index: cc/trees/layer_tree_host_unittest.cc
|
| diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc
|
| index 0653493a4586efe5320834788977c5172de0c350..ead75c7a5cf4bc7c251ca5047784ee861727b282 100644
|
| --- a/cc/trees/layer_tree_host_unittest.cc
|
| +++ b/cc/trees/layer_tree_host_unittest.cc
|
| @@ -739,12 +739,12 @@ SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestDamageWithReplica);
|
| class LayerTreeHostTestPropertyTreesChangedSync : public LayerTreeHostTest {
|
| protected:
|
| void SetupTree() override {
|
| - scoped_refptr<Layer> root = Layer::Create();
|
| - scoped_refptr<Layer> child = Layer::Create();
|
| + root_ = Layer::Create();
|
| + child_ = Layer::Create();
|
| // This is to force the child to create a transform and effect node.
|
| - child->SetForceRenderSurfaceForTesting(true);
|
| - root->AddChild(std::move(child));
|
| - layer_tree_host()->SetRootLayer(root);
|
| + child_->SetForceRenderSurfaceForTesting(true);
|
| + root_->AddChild(child_);
|
| + layer_tree_host()->SetRootLayer(root_);
|
| LayerTreeHostTest::SetupTree();
|
| }
|
|
|
| @@ -785,13 +785,16 @@ class LayerTreeHostTestPropertyTreesChangedSync : public LayerTreeHostTest {
|
| break;
|
| case TRANSFORM:
|
| index_++;
|
| - EXPECT_TRUE(impl->active_tree()->root_layer()->LayerPropertyChanged());
|
| + EXPECT_TRUE(impl->active_tree()
|
| + ->LayerById(root_->id())
|
| + ->LayerPropertyChanged());
|
| impl->active_tree()->ResetAllChangeTracking(
|
| PropertyTrees::ResetFlags::EFFECT_TREE);
|
| - EXPECT_FALSE(impl->active_tree()->root_layer()->LayerPropertyChanged());
|
| EXPECT_FALSE(impl->active_tree()
|
| - ->root_layer()
|
| - ->child_at(0)
|
| + ->LayerById(root_->id())
|
| + ->LayerPropertyChanged());
|
| + EXPECT_FALSE(impl->active_tree()
|
| + ->LayerById(child_->id())
|
| ->LayerPropertyChanged());
|
| transform.Translate(10, 10);
|
| impl->active_tree()->root_layer()->OnTransformAnimated(transform);
|
| @@ -801,15 +804,13 @@ class LayerTreeHostTestPropertyTreesChangedSync : public LayerTreeHostTest {
|
| index_++;
|
| EXPECT_TRUE(impl->active_tree()->root_layer()->LayerPropertyChanged());
|
| EXPECT_TRUE(impl->active_tree()
|
| - ->root_layer()
|
| - ->child_at(0)
|
| + ->LayerById(child_->id())
|
| ->LayerPropertyChanged());
|
| impl->active_tree()->ResetAllChangeTracking(
|
| PropertyTrees::ResetFlags::TRANSFORM_TREE);
|
| EXPECT_FALSE(impl->active_tree()->root_layer()->LayerPropertyChanged());
|
| EXPECT_FALSE(impl->active_tree()
|
| - ->root_layer()
|
| - ->child_at(0)
|
| + ->LayerById(child_->id())
|
| ->LayerPropertyChanged());
|
| filters.Append(FilterOperation::CreateOpacityFilter(0.5f));
|
| impl->active_tree()->root_layer()->OnFilterAnimated(filters);
|
| @@ -823,7 +824,11 @@ class LayerTreeHostTestPropertyTreesChangedSync : public LayerTreeHostTest {
|
| }
|
|
|
| void AfterTest() override {}
|
| +
|
| + private:
|
| int index_;
|
| + scoped_refptr<Layer> root_;
|
| + scoped_refptr<Layer> child_;
|
| };
|
|
|
| SINGLE_THREAD_TEST_F(LayerTreeHostTestPropertyTreesChangedSync);
|
|
|