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

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

Issue 185593010: Web Animations: Sort Players in DocumentTimeline::serviceAnimations (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add some braces Created 6 years, 9 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
« no previous file with comments | « Source/core/animation/DocumentTimeline.cpp ('k') | Source/core/animation/Player.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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 // This should only be used for CSS 89 // This should only be used for CSS
90 void unpause(); 90 void unpause();
91 91
92 void setOutdated(); 92 void setOutdated();
93 bool outdated() { return m_outdated; } 93 bool outdated() { return m_outdated; }
94 94
95 bool maybeStartAnimationOnCompositor(); 95 bool maybeStartAnimationOnCompositor();
96 void cancelAnimationOnCompositor(); 96 void cancelAnimationOnCompositor();
97 bool hasActiveAnimationsOnCompositor(); 97 bool hasActiveAnimationsOnCompositor();
98 98
99 static bool hasLowerPriority(Player*, Player*);
100
99 private: 101 private:
100 Player(DocumentTimeline&, TimedItem*); 102 Player(DocumentTimeline&, TimedItem*);
101 double sourceEnd() const; 103 double sourceEnd() const;
102 bool limited(double currentTime) const; 104 bool limited(double currentTime) const;
103 double currentTimeWithoutLag() const; 105 double currentTimeWithoutLag() const;
104 double currentTimeWithLag() const; 106 double currentTimeWithLag() const;
105 void updateTimingState(double newCurrentTime); 107 void updateTimingState(double newCurrentTime);
106 void updateCurrentTimingState(); 108 void updateCurrentTimingState();
107 109
108 double m_playbackRate; 110 double m_playbackRate;
109 double m_startTime; 111 double m_startTime;
110 double m_holdTime; 112 double m_holdTime;
111 double m_storedTimeLag; 113 double m_storedTimeLag;
112 114
113 RefPtr<TimedItem> m_content; 115 RefPtr<TimedItem> m_content;
114 // FIXME: We should keep the timeline alive and have this as non-null 116 // FIXME: We should keep the timeline alive and have this as non-null
115 // but this is tricky to do without Oilpan 117 // but this is tricky to do without Oilpan
116 DocumentTimeline* m_timeline; 118 DocumentTimeline* m_timeline;
117 // Reflects all pausing, including via pauseForTesting(). 119 // Reflects all pausing, including via pauseForTesting().
118 bool m_paused; 120 bool m_paused;
119 bool m_held; 121 bool m_held;
120 bool m_isPausedForTesting; 122 bool m_isPausedForTesting;
121 123
122 // This indicates timing information relevant to the player has changed 124 // This indicates timing information relevant to the player has changed
123 bool m_outdated; 125 bool m_outdated;
126
127 unsigned m_sequenceNumber;
124 }; 128 };
125 129
126 } // namespace 130 } // namespace
127 131
128 #endif 132 #endif
OLDNEW
« no previous file with comments | « Source/core/animation/DocumentTimeline.cpp ('k') | Source/core/animation/Player.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698