Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(293)

Unified Diff: Source/core/animation/AnimationPlayer.h

Issue 946323002: Animations: Introduce compositor AnimationPlayer and AnimationTimeline. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;

Powered by Google App Engine
This is Rietveld 408576698