| 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/CompositorAnimationTimeline.h" | 5 #include "platform/animation/CompositorAnimationTimeline.h" |
| 6 | 6 |
| 7 #include "cc/animation/animation_host.h" | 7 #include "cc/animation/animation_host.h" |
| 8 #include "cc/animation/animation_id_provider.h" | 8 #include "cc/animation/animation_id_provider.h" |
| 9 #include "platform/animation/CompositorAnimationHost.h" | 9 #include "platform/animation/CompositorAnimationHost.h" |
| 10 #include "platform/animation/CompositorAnimationPlayer.h" | 10 #include "platform/animation/CompositorAnimationPlayer.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 // compositor shutdown. | 21 // compositor shutdown. |
| 22 if (m_animationTimeline->animation_host()) | 22 if (m_animationTimeline->animation_host()) |
| 23 m_animationTimeline->animation_host()->RemoveAnimationTimeline( | 23 m_animationTimeline->animation_host()->RemoveAnimationTimeline( |
| 24 m_animationTimeline); | 24 m_animationTimeline); |
| 25 } | 25 } |
| 26 | 26 |
| 27 cc::AnimationTimeline* CompositorAnimationTimeline::animationTimeline() const { | 27 cc::AnimationTimeline* CompositorAnimationTimeline::animationTimeline() const { |
| 28 return m_animationTimeline.get(); | 28 return m_animationTimeline.get(); |
| 29 } | 29 } |
| 30 | 30 |
| 31 CompositorAnimationHost CompositorAnimationTimeline::compositorAnimationHost() { | |
| 32 return CompositorAnimationHost(m_animationTimeline->animation_host()); | |
| 33 } | |
| 34 | |
| 35 void CompositorAnimationTimeline::playerAttached( | 31 void CompositorAnimationTimeline::playerAttached( |
| 36 const blink::CompositorAnimationPlayerClient& client) { | 32 const blink::CompositorAnimationPlayerClient& client) { |
| 37 if (client.compositorPlayer()) | 33 if (client.compositorPlayer()) |
| 38 m_animationTimeline->AttachPlayer( | 34 m_animationTimeline->AttachPlayer( |
| 39 client.compositorPlayer()->ccAnimationPlayer()); | 35 client.compositorPlayer()->ccAnimationPlayer()); |
| 40 } | 36 } |
| 41 | 37 |
| 42 void CompositorAnimationTimeline::playerDestroyed( | 38 void CompositorAnimationTimeline::playerDestroyed( |
| 43 const blink::CompositorAnimationPlayerClient& client) { | 39 const blink::CompositorAnimationPlayerClient& client) { |
| 44 if (client.compositorPlayer()) | 40 if (client.compositorPlayer()) |
| 45 m_animationTimeline->DetachPlayer( | 41 m_animationTimeline->DetachPlayer( |
| 46 client.compositorPlayer()->ccAnimationPlayer()); | 42 client.compositorPlayer()->ccAnimationPlayer()); |
| 47 } | 43 } |
| 48 | 44 |
| 49 } // namespace blink | 45 } // namespace blink |
| OLD | NEW |