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

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: 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/Animation.h
diff --git a/Source/core/animation/Animation.h b/Source/core/animation/Animation.h
index 0940b3fe6e246c3325a070cd8a066871dfd18249..1fa6e4fb261e119ccb68c6f86738af9648ae8a14 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() OVERRIDE FINAL { return true; }
const AnimationEffect::CompositableValueMap* compositableValues() const
{
@@ -52,9 +53,15 @@ public:
return m_compositableValues.get();
}
+ bool affects(CSSPropertyID property) const;
const AnimationEffect* effect() const { return m_effect.get(); }
Priority priority() const { return m_priority; }
+ bool isCandidateForCompositorAnimation() const;
+ bool startCompositorAnimations();
shans 2013/11/18 01:02:06 startOnCompositor?
dstockwell 2013/11/18 05:30:34 Sounds good, but let's defer renaming until the en
+ bool isRunningCompositorAnimation(const Element* = 0, CSSPropertyID = CSSPropertyInvalid) const;
shans 2013/11/18 01:02:06 isRunningOnCompositor?
dstockwell 2013/11/18 05:30:34 Sounds good, but let's defer renaming until the en
+ void cancelCompositorAnimations();
shans 2013/11/18 01:02:06 Some comments about when these can be called would
dstockwell 2013/11/18 05:30:34 Done.
+
protected:
// Returns whether style recalc was triggered.
virtual bool applyEffects(bool previouslyInEffect);
@@ -74,8 +81,16 @@ private:
OwnPtr<AnimationEffect::CompositableValueMap> m_compositableValues;
Priority m_priority;
+
+ Vector<int> m_acceleratedAnimationIds;
};
+inline Animation* toAnimation(TimedItem* timedItem)
+{
+ ASSERT_WITH_SECURITY_IMPLICATION(timedItem && timedItem->isAnimation());
+ return static_cast<Animation*>(timedItem);
+}
+
} // namespace WebCore
#endif

Powered by Google App Engine
This is Rietveld 408576698