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

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

Issue 1196023003: Web Animations: Avoid iteration when checking for outdated animations on timeline (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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
« no previous file with comments | « Source/core/animation/Animation.cpp ('k') | Source/core/animation/AnimationTimeline.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/AnimationTimeline.h
diff --git a/Source/core/animation/AnimationTimeline.h b/Source/core/animation/AnimationTimeline.h
index 5e24cd2530a266e05944084241f51e71fd389e0c..619d2ff594de6c64e9b46cc100ba48886c710aea 100644
--- a/Source/core/animation/AnimationTimeline.h
+++ b/Source/core/animation/AnimationTimeline.h
@@ -93,7 +93,8 @@ public:
void pauseAnimationsForTesting(double);
void setOutdatedAnimation(Animation*);
- bool hasOutdatedAnimation() const;
+ void clearOutdatedAnimation(Animation*);
+ bool hasOutdatedAnimation() const { return m_outdatedAnimationCount > 0; }
bool needsAnimationTimingUpdate();
void setPlaybackRate(double);
@@ -116,6 +117,7 @@ private:
RawPtrWillBeMember<Document> m_document;
double m_zeroTime;
bool m_zeroTimeInitialized;
+ unsigned m_outdatedAnimationCount;
// Animations which will be updated on the next frame
// i.e. current, in effect, or had timing changed
WillBeHeapHashSet<RefPtrWillBeMember<Animation>> m_animationsNeedingUpdate;
« no previous file with comments | « Source/core/animation/Animation.cpp ('k') | Source/core/animation/AnimationTimeline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698