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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 | 57 |
58 virtual void pushPropertiesTo(LayerImpl* layerImpl) OVERRIDE | 58 virtual void pushPropertiesTo(LayerImpl* layerImpl) OVERRIDE |
59 { | 59 { |
60 Layer::pushPropertiesTo(layerImpl); | 60 Layer::pushPropertiesTo(layerImpl); |
61 | 61 |
62 MockLayerImpl* mockLayerImpl = static_cast<MockLayerImpl*>(layerImpl); | 62 MockLayerImpl* mockLayerImpl = static_cast<MockLayerImpl*>(layerImpl); |
63 mockLayerImpl->setLayerImplDestructionList(m_layerImplDestructionList); | 63 mockLayerImpl->setLayerImplDestructionList(m_layerImplDestructionList); |
64 } | 64 } |
65 | 65 |
66 private: | 66 private: |
67 MockLayer(std::vector<int>* layerImplDestructionList) | 67 explicit MockLayer(std::vector<int>* layerImplDestructionList) |
68 : Layer() | 68 : Layer() |
69 , m_layerImplDestructionList(layerImplDestructionList) | 69 , m_layerImplDestructionList(layerImplDestructionList) |
70 { | 70 { |
71 } | 71 } |
72 virtual ~MockLayer() { } | 72 virtual ~MockLayer() { } |
73 | 73 |
74 std::vector<int>* m_layerImplDestructionList; | 74 std::vector<int>* m_layerImplDestructionList; |
75 }; | 75 }; |
76 | 76 |
77 class FakeLayerAnimationController : public LayerAnimationController { | 77 class FakeLayerAnimationController : public LayerAnimationController { |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 EXPECT_FALSE(static_cast<FakeLayerAnimationController*>(layerTreeRoot->layer
AnimationController())->synchronizedAnimations()); | 376 EXPECT_FALSE(static_cast<FakeLayerAnimationController*>(layerTreeRoot->layer
AnimationController())->synchronizedAnimations()); |
377 | 377 |
378 scoped_ptr<LayerImpl> layerImplTreeRoot = TreeSynchronizer::synchronizeTrees
(layerTreeRoot.get(), scoped_ptr<LayerImpl>(), m_hostImpl.activeTree()); | 378 scoped_ptr<LayerImpl> layerImplTreeRoot = TreeSynchronizer::synchronizeTrees
(layerTreeRoot.get(), scoped_ptr<LayerImpl>(), m_hostImpl.activeTree()); |
379 layerImplTreeRoot = TreeSynchronizer::synchronizeTrees(layerTreeRoot.get(),
layerImplTreeRoot.Pass(), m_hostImpl.activeTree()); | 379 layerImplTreeRoot = TreeSynchronizer::synchronizeTrees(layerTreeRoot.get(),
layerImplTreeRoot.Pass(), m_hostImpl.activeTree()); |
380 | 380 |
381 EXPECT_TRUE(static_cast<FakeLayerAnimationController*>(layerTreeRoot->layerA
nimationController())->synchronizedAnimations()); | 381 EXPECT_TRUE(static_cast<FakeLayerAnimationController*>(layerTreeRoot->layerA
nimationController())->synchronizedAnimations()); |
382 } | 382 } |
383 | 383 |
384 } // namespace | 384 } // namespace |
385 } // namespace cc | 385 } // namespace cc |
OLD | NEW |