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 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 DebugScopedSetImplThread impl(&proxy); | 486 DebugScopedSetImplThread impl(&proxy); |
487 FakeRenderingStatsInstrumentation stats_instrumentation; | 487 FakeRenderingStatsInstrumentation stats_instrumentation; |
488 scoped_ptr<LayerTreeHostImpl> host_impl = | 488 scoped_ptr<LayerTreeHostImpl> host_impl = |
489 LayerTreeHostImpl::Create(settings, | 489 LayerTreeHostImpl::Create(settings, |
490 NULL, | 490 NULL, |
491 &proxy, | 491 &proxy, |
492 &stats_instrumentation); | 492 &stats_instrumentation); |
493 | 493 |
494 scoped_refptr<Layer> layer_tree_root = Layer::Create(); | 494 scoped_refptr<Layer> layer_tree_root = Layer::Create(); |
495 | 495 |
496 layer_tree_root->SetLayerAnimationController( | 496 layer_tree_root->SetLayerAnimationControllerForTest( |
497 FakeLayerAnimationController::Create()); | 497 FakeLayerAnimationController::Create()); |
498 | 498 |
499 EXPECT_FALSE(static_cast<FakeLayerAnimationController*>( | 499 EXPECT_FALSE(static_cast<FakeLayerAnimationController*>( |
500 layer_tree_root->layer_animation_controller())->SynchronizedAnimations()); | 500 layer_tree_root->layer_animation_controller())->SynchronizedAnimations()); |
501 | 501 |
502 scoped_ptr<LayerImpl> layer_impl_tree_root = | 502 scoped_ptr<LayerImpl> layer_impl_tree_root = |
503 TreeSynchronizer::SynchronizeTrees(layer_tree_root.get(), | 503 TreeSynchronizer::SynchronizeTrees(layer_tree_root.get(), |
504 scoped_ptr<LayerImpl>(), | 504 scoped_ptr<LayerImpl>(), |
505 host_impl_.active_tree()); | 505 host_impl_.active_tree()); |
506 TreeSynchronizer::PushProperties(layer_tree_root.get(), | 506 TreeSynchronizer::PushProperties(layer_tree_root.get(), |
507 layer_impl_tree_root.get()); | 507 layer_impl_tree_root.get()); |
508 layer_impl_tree_root = | 508 layer_impl_tree_root = |
509 TreeSynchronizer::SynchronizeTrees(layer_tree_root.get(), | 509 TreeSynchronizer::SynchronizeTrees(layer_tree_root.get(), |
510 layer_impl_tree_root.Pass(), | 510 layer_impl_tree_root.Pass(), |
511 host_impl_.active_tree()); | 511 host_impl_.active_tree()); |
512 | 512 |
513 EXPECT_TRUE(static_cast<FakeLayerAnimationController*>( | 513 EXPECT_TRUE(static_cast<FakeLayerAnimationController*>( |
514 layer_tree_root->layer_animation_controller())->SynchronizedAnimations()); | 514 layer_tree_root->layer_animation_controller())->SynchronizedAnimations()); |
515 } | 515 } |
516 | 516 |
517 } // namespace | 517 } // namespace |
518 } // namespace cc | 518 } // namespace cc |
OLD | NEW |