| Index: Source/core/animation/AnimationPlayer.h
|
| diff --git a/Source/core/animation/AnimationPlayer.h b/Source/core/animation/AnimationPlayer.h
|
| index d9e23f50270e37e2b3f36e6c7d86b064221e7f71..a754e86fedc49e19d56533e2bb5c9da20171524a 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);
|
| @@ -140,7 +145,8 @@ public:
|
| void setOutdated();
|
| bool outdated() { return m_outdated; }
|
|
|
| - bool canStartAnimationOnCompositor();
|
| + bool canStartAnimationOnCompositor() const;
|
| + bool isCandidateForAnimationOnCompositor() const;
|
| bool maybeStartAnimationOnCompositor();
|
| void cancelAnimationOnCompositor();
|
| void restartAnimationOnCompositor();
|
| @@ -149,6 +155,8 @@ public:
|
| void setCompositorPending(bool sourceChanged = false);
|
| void notifyCompositorStartTime(double timelineTime);
|
| void notifyStartTime(double timelineTime);
|
| + // WebCompositorAnimationPlayerClient implementation.
|
| + WebCompositorAnimationPlayer* compositorPlayer() const override { return m_compositorPlayer.get(); }
|
|
|
| bool affects(const Element&, CSSPropertyID) const;
|
|
|
| @@ -183,6 +191,16 @@ private:
|
| void beginUpdatingState();
|
| void endUpdatingState();
|
|
|
| + void createCompositorPlayer();
|
| + void destroyCompositorPlayer();
|
| + void attachCompositorTimeline();
|
| + void detachCompositorTimeline();
|
| + void attachCompositedLayers();
|
| + void detachCompositedLayers();
|
| + // WebCompositorAnimationDelegate implementation.
|
| + void notifyAnimationStarted(double monotonicTime, int group) override;
|
| + void notifyAnimationFinished(double monotonicTime, int group) override { }
|
| +
|
| AnimationPlayState m_playState;
|
| double m_playbackRate;
|
| double m_startTime;
|
| @@ -258,9 +276,10 @@ private:
|
| bool m_compositorPending;
|
| int m_compositorGroup;
|
|
|
| + OwnPtr<WebCompositorAnimationPlayer> m_compositorPlayer;
|
| +
|
| bool m_currentTimePending;
|
| bool m_stateIsBeingUpdated;
|
| -
|
| };
|
|
|
| } // namespace blink
|
|
|