OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "cc/trees/tree_synchronizer.h" | 5 #include "cc/trees/tree_synchronizer.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 const std::set<Layer*>* clip_children = | 180 const std::set<Layer*>* clip_children = |
181 layer_clip_parent->clip_children(); | 181 layer_clip_parent->clip_children(); |
182 ASSERT_EQ(layer_clip_parent->id(), layer_impl_clip_parent->id()); | 182 ASSERT_EQ(layer_clip_parent->id(), layer_impl_clip_parent->id()); |
183 ASSERT_TRUE(clip_children->find(layer) != clip_children->end()); | 183 ASSERT_TRUE(clip_children->find(layer) != clip_children->end()); |
184 ASSERT_TRUE(clip_children_impl->find(layer_impl) != | 184 ASSERT_TRUE(clip_children_impl->find(layer_impl) != |
185 clip_children_impl->end()); | 185 clip_children_impl->end()); |
186 } | 186 } |
187 | 187 |
188 for (size_t i = 0; i < layer_children.size(); ++i) { | 188 for (size_t i = 0; i < layer_children.size(); ++i) { |
189 SCOPED_TRACE(base::StringPrintf("child layer %" PRIuS, i).c_str()); | 189 SCOPED_TRACE(base::StringPrintf("child layer %" PRIuS, i).c_str()); |
190 ExpectTreesAreIdentical( | 190 ExpectTreesAreIdentical(layer_children[i].get(), |
191 layer_children[i].get(), layer_impl_children[i], tree_impl); | 191 layer_impl_children[i].get(), tree_impl); |
192 } | 192 } |
193 } | 193 } |
194 | 194 |
195 class TreeSynchronizerTest : public testing::Test { | 195 class TreeSynchronizerTest : public testing::Test { |
196 public: | 196 public: |
197 TreeSynchronizerTest() | 197 TreeSynchronizerTest() |
198 : client_(FakeLayerTreeHostClient::DIRECT_3D), | 198 : client_(FakeLayerTreeHostClient::DIRECT_3D), |
199 host_(FakeLayerTreeHost::Create(&client_, &task_graph_runner_)) {} | 199 host_(FakeLayerTreeHost::Create(&client_, &task_graph_runner_)) {} |
200 | 200 |
201 protected: | 201 protected: |
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
740 host_impl->active_tree()); | 740 host_impl->active_tree()); |
741 | 741 |
742 // The clip children should have been unhooked. | 742 // The clip children should have been unhooked. |
743 EXPECT_EQ(2u, intervening->children().size()); | 743 EXPECT_EQ(2u, intervening->children().size()); |
744 EXPECT_FALSE(clip_child2->clip_parent()); | 744 EXPECT_FALSE(clip_child2->clip_parent()); |
745 EXPECT_FALSE(additional_clip_child->clip_parent()); | 745 EXPECT_FALSE(additional_clip_child->clip_parent()); |
746 } | 746 } |
747 | 747 |
748 } // namespace | 748 } // namespace |
749 } // namespace cc | 749 } // namespace cc |
OLD | NEW |