| 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/tree_synchronizer.h" | 5 #include "cc/tree_synchronizer.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "cc/layer.h" | 9 #include "cc/layer.h" |
| 10 #include "cc/layer_animation_controller.h" | 10 #include "cc/layer_animation_controller.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 bool synchronizedAnimations() const { return m_synchronizedAnimations; } | 84 bool synchronizedAnimations() const { return m_synchronizedAnimations; } |
| 85 | 85 |
| 86 private: | 86 private: |
| 87 FakeLayerAnimationController() | 87 FakeLayerAnimationController() |
| 88 : LayerAnimationController(1) | 88 : LayerAnimationController(1) |
| 89 , m_synchronizedAnimations(false) | 89 , m_synchronizedAnimations(false) |
| 90 { } | 90 { } |
| 91 | 91 |
| 92 virtual ~FakeLayerAnimationController() { } | 92 virtual ~FakeLayerAnimationController() { } |
| 93 | 93 |
| 94 virtual void pushAnimationUpdatesTo(LayerAnimationController* controllerImpl
) OVERRIDE | 94 virtual void PushAnimationUpdatesTo(LayerAnimationController* controllerImpl
) OVERRIDE |
| 95 { | 95 { |
| 96 LayerAnimationController::pushAnimationUpdatesTo(controllerImpl); | 96 LayerAnimationController::PushAnimationUpdatesTo(controllerImpl); |
| 97 m_synchronizedAnimations = true; | 97 m_synchronizedAnimations = true; |
| 98 } | 98 } |
| 99 | 99 |
| 100 bool m_synchronizedAnimations; | 100 bool m_synchronizedAnimations; |
| 101 }; | 101 }; |
| 102 | 102 |
| 103 void expectTreesAreIdentical(Layer* layer, LayerImpl* layerImpl, LayerTreeImpl*
treeImpl) | 103 void expectTreesAreIdentical(Layer* layer, LayerImpl* layerImpl, LayerTreeImpl*
treeImpl) |
| 104 { | 104 { |
| 105 ASSERT_TRUE(layer); | 105 ASSERT_TRUE(layer); |
| 106 ASSERT_TRUE(layerImpl); | 106 ASSERT_TRUE(layerImpl); |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 | 394 |
| 395 scoped_ptr<LayerImpl> layerImplTreeRoot = TreeSynchronizer::synchronizeTrees
(layerTreeRoot.get(), scoped_ptr<LayerImpl>(), m_hostImpl.activeTree()); | 395 scoped_ptr<LayerImpl> layerImplTreeRoot = TreeSynchronizer::synchronizeTrees
(layerTreeRoot.get(), scoped_ptr<LayerImpl>(), m_hostImpl.activeTree()); |
| 396 TreeSynchronizer::pushProperties(layerTreeRoot.get(), layerImplTreeRoot.get(
)); | 396 TreeSynchronizer::pushProperties(layerTreeRoot.get(), layerImplTreeRoot.get(
)); |
| 397 layerImplTreeRoot = TreeSynchronizer::synchronizeTrees(layerTreeRoot.get(),
layerImplTreeRoot.Pass(), m_hostImpl.activeTree()); | 397 layerImplTreeRoot = TreeSynchronizer::synchronizeTrees(layerTreeRoot.get(),
layerImplTreeRoot.Pass(), m_hostImpl.activeTree()); |
| 398 | 398 |
| 399 EXPECT_TRUE(static_cast<FakeLayerAnimationController*>(layerTreeRoot->layerA
nimationController())->synchronizedAnimations()); | 399 EXPECT_TRUE(static_cast<FakeLayerAnimationController*>(layerTreeRoot->layerA
nimationController())->synchronizedAnimations()); |
| 400 } | 400 } |
| 401 | 401 |
| 402 } // namespace | 402 } // namespace |
| 403 } // namespace cc | 403 } // namespace cc |
| OLD | NEW |