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

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

Issue 23874019: Web Animations CSS: Start running animations on the compositor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase and rename hasActiveAnimationOnCompositor to hasActiveAnimationsOnCompositor 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
« no previous file with comments | « Source/core/animation/ActiveAnimations.cpp ('k') | Source/core/animation/Animation.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/Animation.h
diff --git a/Source/core/animation/Animation.h b/Source/core/animation/Animation.h
index 0940b3fe6e246c3325a070cd8a066871dfd18249..0c60f8eb1cc68405816c6c4ce9cae7208cc5854d 100644
--- a/Source/core/animation/Animation.h
+++ b/Source/core/animation/Animation.h
@@ -45,6 +45,7 @@ public:
enum Priority { DefaultPriority, TransitionPriority };
static PassRefPtr<Animation> create(PassRefPtr<Element>, PassRefPtr<AnimationEffect>, const Timing&, Priority = DefaultPriority, PassOwnPtr<EventDelegate> = nullptr);
+ virtual bool isAnimation() const OVERRIDE FINAL { return true; }
const AnimationEffect::CompositableValueMap* compositableValues() const
{
@@ -52,9 +53,17 @@ public:
return m_compositableValues.get();
}
+ bool affects(CSSPropertyID) const;
const AnimationEffect* effect() const { return m_effect.get(); }
Priority priority() const { return m_priority; }
+ bool isCandidateForAnimationOnCompositor() const;
+ // Must only be called once and assumes to be part of a player without a start time.
+ bool maybeStartAnimationOnCompositor();
+ bool hasActiveAnimationsOnCompositor() const;
+ bool hasActiveAnimationsOnCompositor(CSSPropertyID) const;
+ void cancelAnimationOnCompositor();
+
protected:
// Returns whether style recalc was triggered.
virtual bool applyEffects(bool previouslyInEffect);
@@ -74,8 +83,12 @@ private:
OwnPtr<AnimationEffect::CompositableValueMap> m_compositableValues;
Priority m_priority;
+
+ Vector<int> m_compositorAnimationIds;
};
+DEFINE_TYPE_CASTS(Animation, TimedItem, timedItem, timedItem->isAnimation(), timedItem.isAnimation());
+
} // namespace WebCore
#endif
« no previous file with comments | « Source/core/animation/ActiveAnimations.cpp ('k') | Source/core/animation/Animation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698