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

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

Issue 23874019: Web Animations CSS: Start running animations on the compositor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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/Player.h
diff --git a/Source/core/animation/Player.h b/Source/core/animation/Player.h
index b4b4d81c1a9e7f2a5efb6657b73e4704984a95f0..67914861af66be247bf893d700dc778e8878ef11 100644
--- a/Source/core/animation/Player.h
+++ b/Source/core/animation/Player.h
@@ -31,12 +31,14 @@
#ifndef Player_h
#define Player_h
+#include "CSSPropertyNames.h"
#include "core/animation/TimedItem.h"
#include "wtf/RefPtr.h"
namespace WebCore {
class DocumentTimeline;
+class Element;
class Player FINAL : public RefCounted<Player> {
@@ -44,6 +46,8 @@ public:
~Player();
static PassRefPtr<Player> create(DocumentTimeline&, TimedItem*);
+ static double effectiveTime(double time) { return isNull(time) ? 0 : time; }
+
// Returns whether this player is still current or in effect.
// timeToEffectChange returns:
// infinity - if this player is no longer in effect
@@ -75,6 +79,11 @@ public:
// Reflects all pausing, including via pauseForTesting().
bool pausedInternal() const { return !isNull(m_pauseStartTime); }
+ bool isCandidateForCompositorAnimation() const;
+ bool startCompositorAnimations();
+ bool isRunningCompositorAnimation(const Element* = 0, CSSPropertyID = CSSPropertyInvalid);
+ void cancelCompositorAnimations();
+
private:
Player(DocumentTimeline&, TimedItem*);
inline double pausedTimeDrift() const;

Powered by Google App Engine
This is Rietveld 408576698