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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 // Pick some random properties to set. The values are not important, we're | 264 // Pick some random properties to set. The values are not important, we're |
265 // just testing that at least some properties are making it through. | 265 // just testing that at least some properties are making it through. |
266 gfx::PointF root_position = gfx::PointF(2.3f, 7.4f); | 266 gfx::PointF root_position = gfx::PointF(2.3f, 7.4f); |
267 layer_tree_root->SetPosition(root_position); | 267 layer_tree_root->SetPosition(root_position); |
268 | 268 |
269 float first_child_opacity = 0.25f; | 269 float first_child_opacity = 0.25f; |
270 layer_tree_root->children()[0]->SetOpacity(first_child_opacity); | 270 layer_tree_root->children()[0]->SetOpacity(first_child_opacity); |
271 | 271 |
272 gfx::Size second_child_bounds = gfx::Size(25, 53); | 272 gfx::Size second_child_bounds = gfx::Size(25, 53); |
273 layer_tree_root->children()[1]->SetBounds(second_child_bounds); | 273 layer_tree_root->children()[1]->SetBounds(second_child_bounds); |
| 274 layer_tree_root->children()[1]->SavePaintProperties(); |
274 | 275 |
275 scoped_ptr<LayerImpl> layer_impl_tree_root = | 276 scoped_ptr<LayerImpl> layer_impl_tree_root = |
276 TreeSynchronizer::SynchronizeTrees(layer_tree_root.get(), | 277 TreeSynchronizer::SynchronizeTrees(layer_tree_root.get(), |
277 scoped_ptr<LayerImpl>(), | 278 scoped_ptr<LayerImpl>(), |
278 host_impl_.active_tree()); | 279 host_impl_.active_tree()); |
279 ExpectTreesAreIdentical(layer_tree_root.get(), | 280 ExpectTreesAreIdentical(layer_tree_root.get(), |
280 layer_impl_tree_root.get(), | 281 layer_impl_tree_root.get(), |
281 host_impl_.active_tree()); | 282 host_impl_.active_tree()); |
282 | 283 |
283 TreeSynchronizer::PushProperties(layer_tree_root.get(), | 284 TreeSynchronizer::PushProperties(layer_tree_root.get(), |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
509 TreeSynchronizer::SynchronizeTrees(layer_tree_root.get(), | 510 TreeSynchronizer::SynchronizeTrees(layer_tree_root.get(), |
510 layer_impl_tree_root.Pass(), | 511 layer_impl_tree_root.Pass(), |
511 host_impl_.active_tree()); | 512 host_impl_.active_tree()); |
512 | 513 |
513 EXPECT_TRUE(static_cast<FakeLayerAnimationController*>( | 514 EXPECT_TRUE(static_cast<FakeLayerAnimationController*>( |
514 layer_tree_root->layer_animation_controller())->SynchronizedAnimations()); | 515 layer_tree_root->layer_animation_controller())->SynchronizedAnimations()); |
515 } | 516 } |
516 | 517 |
517 } // namespace | 518 } // namespace |
518 } // namespace cc | 519 } // namespace cc |
OLD | NEW |