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

Side by Side Diff: Source/core/animation/AnimationPlayer.h

Issue 535843002: Web Animations: Add a name to AnimationNode and trace running players (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use setFinished in uncancel. Created 6 years, 3 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 | « Source/core/animation/AnimationNode.h ('k') | Source/core/animation/AnimationPlayer.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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<Even tListener>, bool useCapture = false) OVERRIDE; 157 virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<Even tListener>, bool useCapture = false) OVERRIDE;
158 158
159 virtual void trace(Visitor*) OVERRIDE; 159 virtual void trace(Visitor*) OVERRIDE;
160 160
161 private: 161 private:
162 AnimationPlayer(ExecutionContext*, AnimationTimeline&, AnimationNode*); 162 AnimationPlayer(ExecutionContext*, AnimationTimeline&, AnimationNode*);
163 double sourceEnd() const; 163 double sourceEnd() const;
164 bool limited(double currentTime) const; 164 bool limited(double currentTime) const;
165 void updateCurrentTimingState(TimingUpdateReason); 165 void updateCurrentTimingState(TimingUpdateReason);
166 void unpauseInternal(); 166 void unpauseInternal();
167 void uncancel();
168 void setFinished(bool);
167 169
168 double m_playbackRate; 170 double m_playbackRate;
169 171
170 double m_startTime; 172 double m_startTime;
171 double m_holdTime; 173 double m_holdTime;
172 174
173 unsigned m_sequenceNumber; 175 unsigned m_sequenceNumber;
174 176
175 RefPtrWillBeMember<AnimationNode> m_content; 177 RefPtrWillBeMember<AnimationNode> m_content;
176 RawPtrWillBeMember<AnimationTimeline> m_timeline; 178 RawPtrWillBeMember<AnimationTimeline> m_timeline;
(...skipping 28 matching lines...) Expand all
205 , sourceChanged(false) 207 , sourceChanged(false)
206 , pendingAction(Start) 208 , pendingAction(Start)
207 { } 209 { }
208 double startTime; 210 double startTime;
209 double holdTime; 211 double holdTime;
210 double playbackRate; 212 double playbackRate;
211 bool sourceChanged; 213 bool sourceChanged;
212 CompositorAction pendingAction; 214 CompositorAction pendingAction;
213 }; 215 };
214 216
215 void uncancel()
216 {
217 if (m_idle) {
218 m_idle = false;
219 m_finished = false;
220 m_held = true;
221 m_holdTime = 0;
222 }
223 }
224
225 // This mirrors the known compositor state. It is created when a compositor 217 // This mirrors the known compositor state. It is created when a compositor
226 // animation is started. Updated once the start time is known and each time 218 // animation is started. Updated once the start time is known and each time
227 // modifications are pushed to the compositor. 219 // modifications are pushed to the compositor.
228 OwnPtr<CompositorState> m_compositorState; 220 OwnPtr<CompositorState> m_compositorState;
229 bool m_compositorPending; 221 bool m_compositorPending;
230 bool m_currentTimePending; 222 bool m_currentTimePending;
231 bool m_idle; 223 bool m_idle;
232 }; 224 };
233 225
234 } // namespace blink 226 } // namespace blink
235 227
236 #endif 228 #endif
OLDNEW
« no previous file with comments | « Source/core/animation/AnimationNode.h ('k') | Source/core/animation/AnimationPlayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698