OLD | NEW |
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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 #endif | 96 #endif |
97 | 97 |
98 bool hasStartTime() const { return !isNull(m_startTime); } | 98 bool hasStartTime() const { return !isNull(m_startTime); } |
99 double startTime() const { return m_startTime * 1000; } | 99 double startTime() const { return m_startTime * 1000; } |
100 double startTimeInternal() const { return m_startTime; } | 100 double startTimeInternal() const { return m_startTime; } |
101 void setStartTime(double startTime) { setStartTimeInternal(startTime / 1000)
; } | 101 void setStartTime(double startTime) { setStartTimeInternal(startTime / 1000)
; } |
102 void setStartTimeInternal(double, bool isUpdateFromCompositor = false); | 102 void setStartTimeInternal(double, bool isUpdateFromCompositor = false); |
103 | 103 |
104 const AnimationNode* source() const { return m_content.get(); } | 104 const AnimationNode* source() const { return m_content.get(); } |
105 AnimationNode* source() { return m_content.get(); } | 105 AnimationNode* source() { return m_content.get(); } |
106 AnimationNode* source(bool& isNull) { isNull = !m_content; return m_content.
get(); } | |
107 void setSource(AnimationNode*); | 106 void setSource(AnimationNode*); |
108 | 107 |
109 double timeLag() { return timeLagInternal() * 1000; } | 108 double timeLag() { return timeLagInternal() * 1000; } |
110 double timeLagInternal() { return currentTimeWithoutLag() - currentTimeInter
nal(); } | 109 double timeLagInternal() { return currentTimeWithoutLag() - currentTimeInter
nal(); } |
111 | 110 |
112 // Pausing via this method is not reflected in the value returned by | 111 // Pausing via this method is not reflected in the value returned by |
113 // paused() and must never overlap with pausing via pause(). | 112 // paused() and must never overlap with pausing via pause(). |
114 void pauseForTesting(double pauseTime); | 113 void pauseForTesting(double pauseTime); |
115 // This should only be used for CSS | 114 // This should only be used for CSS |
116 void unpause(); | 115 void unpause(); |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 bool m_finished; | 185 bool m_finished; |
187 // Holds a 'finished' event queued for asynchronous dispatch via the | 186 // Holds a 'finished' event queued for asynchronous dispatch via the |
188 // ScriptedAnimationController. This object remains active until the | 187 // ScriptedAnimationController. This object remains active until the |
189 // event is actually dispatched. | 188 // event is actually dispatched. |
190 RefPtrWillBeMember<Event> m_pendingFinishedEvent; | 189 RefPtrWillBeMember<Event> m_pendingFinishedEvent; |
191 }; | 190 }; |
192 | 191 |
193 } // namespace | 192 } // namespace |
194 | 193 |
195 #endif | 194 #endif |
OLD | NEW |