Chromium Code Reviews| 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 5086f7fbbfc8be6f2cf3501ddcfeb5f18e73afb9..39d25f277b75fac96f605e5cd851ec9d865049f5 100644 |
| --- a/cc/trees/layer_tree_host_unittest.cc |
| +++ b/cc/trees/layer_tree_host_unittest.cc |
| @@ -692,6 +692,10 @@ class LayerTreeHostTestPropertyTreesChangedSync : public LayerTreeHostTest { |
| protected: |
| void SetupTree() override { |
| scoped_refptr<Layer> root = Layer::Create(); |
| + scoped_refptr<Layer> child = Layer::Create(); |
| + // This is to force the child to create a transform and effect node. |
| + child->SetForceRenderSurface(true); |
| + root->AddChild(std::move(child)); |
| layer_tree_host()->SetRootLayer(root); |
| LayerTreeHostTest::SetupTree(); |
| } |
| @@ -725,16 +729,31 @@ class LayerTreeHostTestPropertyTreesChangedSync : public LayerTreeHostTest { |
| 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) |
| + ->LayerPropertyChanged()); |
| transform.Translate(10, 10); |
| impl->active_tree()->root_layer()->OnTransformAnimated(transform); |
| + // We rebuild property trees on main thread to test the code path of |
| + // damage status synchronization when property trees are different. |
| + layer_tree_host()->property_trees()->needs_rebuild = true; |
|
ajuma
2016/03/24 23:55:53
This is accessing the LayerTreeHost from the compo
jaydasika
2016/03/25 00:05:25
Done.
|
| PostSetNeedsCommitToMainThread(); |
| break; |
| case FILTER: |
| index_++; |
| EXPECT_TRUE(impl->active_tree()->root_layer()->LayerPropertyChanged()); |
| + EXPECT_TRUE(impl->active_tree() |
| + ->root_layer() |
| + ->child_at(0) |
| + ->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) |
| + ->LayerPropertyChanged()); |
| filters.Append(FilterOperation::CreateOpacityFilter(0.5f)); |
| impl->active_tree()->root_layer()->OnFilterAnimated(filters); |
| PostSetNeedsCommitToMainThread(); |