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

Side by Side Diff: Source/core/animation/Animation.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/animation/Animation.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 return animation1->sequenceNumber() < animation2->sequenceNumber(); 177 return animation1->sequenceNumber() < animation2->sequenceNumber();
178 } 178 }
179 179
180 virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<Even tListener>, bool useCapture = false) override; 180 virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<Even tListener>, bool useCapture = false) override;
181 181
182 DECLARE_VIRTUAL_TRACE(); 182 DECLARE_VIRTUAL_TRACE();
183 183
184 private: 184 private:
185 Animation(ExecutionContext*, AnimationTimeline&, AnimationEffect*); 185 Animation(ExecutionContext*, AnimationTimeline&, AnimationEffect*);
186 186
187 void clearOutdated();
188
187 double sourceEnd() const; 189 double sourceEnd() const;
188 bool limited(double currentTime) const; 190 bool limited(double currentTime) const;
189 191
190 AnimationPlayState calculatePlayState(); 192 AnimationPlayState calculatePlayState();
191 double calculateCurrentTime() const; 193 double calculateCurrentTime() const;
192 194
193 void unpauseInternal(); 195 void unpauseInternal();
194 void setPlaybackRateInternal(double); 196 void setPlaybackRateInternal(double);
195 void updateCurrentTimingState(TimingUpdateReason); 197 void updateCurrentTimingState(TimingUpdateReason);
196 198
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 295
294 OwnPtr<WebCompositorAnimationPlayer> m_compositorPlayer; 296 OwnPtr<WebCompositorAnimationPlayer> m_compositorPlayer;
295 297
296 bool m_currentTimePending; 298 bool m_currentTimePending;
297 bool m_stateIsBeingUpdated; 299 bool m_stateIsBeingUpdated;
298 }; 300 };
299 301
300 } // namespace blink 302 } // namespace blink
301 303
302 #endif // Animation_h 304 #endif // Animation_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/animation/Animation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698