| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "cc/animation/layer_animation_controller.h" | 10 #include "cc/animation/layer_animation_controller.h" |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 ExpectTreesAreIdentical( | 112 ExpectTreesAreIdentical( |
| 113 layer->mask_layer(), layer_impl->mask_layer(), tree_impl); | 113 layer->mask_layer(), layer_impl->mask_layer(), tree_impl); |
| 114 } | 114 } |
| 115 | 115 |
| 116 ASSERT_EQ(!!layer->replica_layer(), !!layer_impl->replica_layer()); | 116 ASSERT_EQ(!!layer->replica_layer(), !!layer_impl->replica_layer()); |
| 117 if (layer->replica_layer()) { | 117 if (layer->replica_layer()) { |
| 118 ExpectTreesAreIdentical( | 118 ExpectTreesAreIdentical( |
| 119 layer->replica_layer(), layer_impl->replica_layer(), tree_impl); | 119 layer->replica_layer(), layer_impl->replica_layer(), tree_impl); |
| 120 } | 120 } |
| 121 | 121 |
| 122 const std::vector<scoped_refptr<Layer> >& layer_children = layer->children(); | 122 const LayerList& layer_children = layer->children(); |
| 123 const ScopedPtrVector<LayerImpl>& layer_impl_children = | 123 const OwnedLayerImplList& layer_impl_children = layer_impl->children(); |
| 124 layer_impl->children(); | |
| 125 | 124 |
| 126 ASSERT_EQ(layer_children.size(), layer_impl_children.size()); | 125 ASSERT_EQ(layer_children.size(), layer_impl_children.size()); |
| 127 | 126 |
| 128 for (size_t i = 0; i < layer_children.size(); ++i) { | 127 for (size_t i = 0; i < layer_children.size(); ++i) { |
| 129 ExpectTreesAreIdentical( | 128 ExpectTreesAreIdentical( |
| 130 layer_children[i].get(), layer_impl_children[i], tree_impl); | 129 layer_children[i].get(), layer_impl_children[i], tree_impl); |
| 131 } | 130 } |
| 132 } | 131 } |
| 133 | 132 |
| 134 class TreeSynchronizerTest : public testing::Test { | 133 class TreeSynchronizerTest : public testing::Test { |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 TreeSynchronizer::SynchronizeTrees(layer_tree_root.get(), | 509 TreeSynchronizer::SynchronizeTrees(layer_tree_root.get(), |
| 511 layer_impl_tree_root.Pass(), | 510 layer_impl_tree_root.Pass(), |
| 512 host_impl_.active_tree()); | 511 host_impl_.active_tree()); |
| 513 | 512 |
| 514 EXPECT_TRUE(static_cast<FakeLayerAnimationController*>( | 513 EXPECT_TRUE(static_cast<FakeLayerAnimationController*>( |
| 515 layer_tree_root->layer_animation_controller())->SynchronizedAnimations()); | 514 layer_tree_root->layer_animation_controller())->SynchronizedAnimations()); |
| 516 } | 515 } |
| 517 | 516 |
| 518 } // namespace | 517 } // namespace |
| 519 } // namespace cc | 518 } // namespace cc |
| OLD | NEW |