Index: Source/core/animation/AnimationPlayer.h |
diff --git a/Source/core/animation/AnimationPlayer.h b/Source/core/animation/AnimationPlayer.h |
index 983cb06a8f78cb2249f0707fc30d78365d0fa5cc..f846eeb4ec19e6ca235d5cb5768d97dc068b8143 100644 |
--- a/Source/core/animation/AnimationPlayer.h |
+++ b/Source/core/animation/AnimationPlayer.h |
@@ -39,6 +39,8 @@ |
#include "core/dom/DOMException.h" |
#include "core/events/EventTarget.h" |
#include "platform/heap/Handle.h" |
+#include "public/platform/WebCompositorAnimationDelegate.h" |
+#include "public/platform/WebCompositorAnimationPlayerClient.h" |
#include "wtf/RefPtr.h" |
namespace blink { |
@@ -46,11 +48,14 @@ namespace blink { |
class AnimationTimeline; |
class Element; |
class ExceptionState; |
+class WebCompositorAnimationPlayer; |
class AnimationPlayer final |
- : public EventTargetWithInlineData |
- , public RefCountedWillBeNoBase<AnimationPlayer> |
- , public ActiveDOMObject { |
+ : public EventTargetWithInlineData, |
+ public RefCountedWillBeNoBase<AnimationPlayer>, |
+ public ActiveDOMObject, |
+ public WebCompositorAnimationDelegate, |
+ public WebCompositorAnimationPlayerClient { |
DEFINE_WRAPPERTYPEINFO(); |
REFCOUNTED_EVENT_TARGET(AnimationPlayer); |
WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(AnimationPlayer); |
@@ -150,6 +155,15 @@ public: |
bool affects(const Element&, CSSPropertyID) const; |
+ // WebCompositorAnimationDelegate implementation. |
+ void notifyAnimationStarted(double monotonicTime, int group) override; |
+ void notifyAnimationFinished(double monotonicTime, int group) override; |
dstockwell
2015/02/26 00:07:12
Is this just for consistency? Do we need it?
loyso (OOO)
2015/02/26 03:24:57
That's already existing interface with pure abstra
|
+ |
+ void createCompositorPlayer(); |
dstockwell
2015/02/26 00:07:12
These should probably not be public.
loyso (OOO)
2015/02/26 03:24:57
Sure! This is a side-effect of the draft version.
|
+ void destroyCompositorPlayer(); |
+ // WebCompositorAnimationPlayerClient implementation. |
+ WebCompositorAnimationPlayer* compositorPlayer() const override { return m_compositorPlayer.get(); } |
+ |
void preCommit(int compositorGroup, bool startOnCompositor); |
void postCommit(double timelineTime); |
@@ -262,6 +276,8 @@ private: |
bool m_compositorPending; |
int m_compositorGroup; |
+ OwnPtr<WebCompositorAnimationPlayer> m_compositorPlayer; |
+ |
bool m_currentTimePending; |
bool m_stateIsBeingUpdated; |