| 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 119 |
| 120 bool canStartAnimationOnCompositor(); | 120 bool canStartAnimationOnCompositor(); |
| 121 bool maybeStartAnimationOnCompositor(); | 121 bool maybeStartAnimationOnCompositor(); |
| 122 void cancelAnimationOnCompositor(); | 122 void cancelAnimationOnCompositor(); |
| 123 void schedulePendingAnimationOnCompositor(); | 123 void schedulePendingAnimationOnCompositor(); |
| 124 bool hasActiveAnimationsOnCompositor(); | 124 bool hasActiveAnimationsOnCompositor(); |
| 125 | 125 |
| 126 class SortInfo { | 126 class SortInfo { |
| 127 public: | 127 public: |
| 128 friend class AnimationPlayer; | 128 friend class AnimationPlayer; |
| 129 bool operator<(const SortInfo& other) const; | 129 bool operator<(const SortInfo& other) const |
| 130 double startTime() const { return m_startTime; } | |
| 131 bool hasLowerSequenceNumber(const SortInfo& other) const | |
| 132 { | 130 { |
| 133 return m_sequenceNumber < other.m_sequenceNumber; | 131 return m_sequenceNumber < other.m_sequenceNumber; |
| 134 } | 132 } |
| 135 private: | 133 private: |
| 136 SortInfo(unsigned sequenceNumber, double startTime) | 134 SortInfo(unsigned sequenceNumber) |
| 137 : m_sequenceNumber(sequenceNumber) | 135 : m_sequenceNumber(sequenceNumber) |
| 138 , m_startTime(startTime) | |
| 139 { | 136 { |
| 140 } | 137 } |
| 141 unsigned m_sequenceNumber; | 138 unsigned m_sequenceNumber; |
| 142 double m_startTime; | |
| 143 }; | 139 }; |
| 144 | 140 |
| 145 const SortInfo& sortInfo() const { return m_sortInfo; } | 141 const SortInfo& sortInfo() const { return m_sortInfo; } |
| 146 | 142 |
| 147 static bool hasLowerPriority(AnimationPlayer* player1, AnimationPlayer* play
er2) | 143 static bool hasLowerPriority(AnimationPlayer* player1, AnimationPlayer* play
er2) |
| 148 { | 144 { |
| 149 return player1->sortInfo() < player2->sortInfo(); | 145 return player1->sortInfo() < player2->sortInfo(); |
| 150 } | 146 } |
| 151 | 147 |
| 152 #if !ENABLE(OILPAN) | 148 #if !ENABLE(OILPAN) |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 bool m_finished; | 185 bool m_finished; |
| 190 // Holds a 'finished' event queued for asynchronous dispatch via the | 186 // Holds a 'finished' event queued for asynchronous dispatch via the |
| 191 // ScriptedAnimationController. This object remains active until the | 187 // ScriptedAnimationController. This object remains active until the |
| 192 // event is actually dispatched. | 188 // event is actually dispatched. |
| 193 RefPtrWillBeMember<Event> m_pendingFinishedEvent; | 189 RefPtrWillBeMember<Event> m_pendingFinishedEvent; |
| 194 }; | 190 }; |
| 195 | 191 |
| 196 } // namespace | 192 } // namespace |
| 197 | 193 |
| 198 #endif | 194 #endif |
| OLD | NEW |