OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "platform/animation/CompositorAnimationPlayer.h" | 5 #include "platform/animation/CompositorAnimationPlayer.h" |
6 | 6 |
7 #include "cc/animation/animation_id_provider.h" | 7 #include "cc/animation/animation_id_provider.h" |
8 #include "cc/animation/animation_timeline.h" | 8 #include "cc/animation/animation_timeline.h" |
9 #include "platform/animation/CompositorAnimation.h" | 9 #include "platform/animation/CompositorAnimation.h" |
10 #include "platform/animation/CompositorAnimationDelegate.h" | 10 #include "platform/animation/CompositorAnimationDelegate.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 m_animationPlayer->AttachLayer(webLayer->id()); | 43 m_animationPlayer->AttachLayer(webLayer->id()); |
44 } | 44 } |
45 | 45 |
46 void CompositorAnimationPlayer::detachLayer() | 46 void CompositorAnimationPlayer::detachLayer() |
47 { | 47 { |
48 m_animationPlayer->DetachLayer(); | 48 m_animationPlayer->DetachLayer(); |
49 } | 49 } |
50 | 50 |
51 bool CompositorAnimationPlayer::isLayerAttached() const | 51 bool CompositorAnimationPlayer::isLayerAttached() const |
52 { | 52 { |
53 return m_animationPlayer->layer_id() != 0; | 53 return m_animationPlayer->element_id() != 0; |
54 } | 54 } |
55 | 55 |
56 void CompositorAnimationPlayer::addAnimation(CompositorAnimation* animation) | 56 void CompositorAnimationPlayer::addAnimation(CompositorAnimation* animation) |
57 { | 57 { |
58 m_animationPlayer->AddAnimation(animation->passAnimation()); | 58 m_animationPlayer->AddAnimation(animation->passAnimation()); |
59 delete animation; | 59 delete animation; |
60 } | 60 } |
61 | 61 |
62 void CompositorAnimationPlayer::removeAnimation(int animationId) | 62 void CompositorAnimationPlayer::removeAnimation(int animationId) |
63 { | 63 { |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 { | 109 { |
110 if (m_delegate) { | 110 if (m_delegate) { |
111 m_delegate->notifyAnimationTakeover( | 111 m_delegate->notifyAnimationTakeover( |
112 (monotonicTime - base::TimeTicks()).InSecondsF(), | 112 (monotonicTime - base::TimeTicks()).InSecondsF(), |
113 animationStartTime, | 113 animationStartTime, |
114 std::move(curve)); | 114 std::move(curve)); |
115 } | 115 } |
116 } | 116 } |
117 | 117 |
118 } // namespace blink | 118 } // namespace blink |
OLD | NEW |