| 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 | 167 |
| 168 if (timeToNextEffect < s_minimumDelay) { | 168 if (timeToNextEffect < s_minimumDelay) { |
| 169 m_timing->serviceOnNextFrame(); | 169 m_timing->serviceOnNextFrame(); |
| 170 } else if (timeToNextEffect != std::numeric_limits<double>::infinity()) { | 170 } else if (timeToNextEffect != std::numeric_limits<double>::infinity()) { |
| 171 m_timing->wakeAfter(timeToNextEffect - s_minimumDelay); | 171 m_timing->wakeAfter(timeToNextEffect - s_minimumDelay); |
| 172 } | 172 } |
| 173 } | 173 } |
| 174 | 174 |
| 175 void AnimationTimeline::AnimationTimelineTiming::wakeAfter(double duration) | 175 void AnimationTimeline::AnimationTimelineTiming::wakeAfter(double duration) |
| 176 { | 176 { |
| 177 if (m_timer.isActive() && m_timer.nextFireInterval() < duration) |
| 178 return; |
| 177 m_timer.startOneShot(duration, FROM_HERE); | 179 m_timer.startOneShot(duration, FROM_HERE); |
| 178 } | 180 } |
| 179 | 181 |
| 180 void AnimationTimeline::AnimationTimelineTiming::cancelWake() | 182 void AnimationTimeline::AnimationTimelineTiming::cancelWake() |
| 181 { | 183 { |
| 182 m_timer.stop(); | 184 m_timer.stop(); |
| 183 } | 185 } |
| 184 | 186 |
| 185 void AnimationTimeline::AnimationTimelineTiming::serviceOnNextFrame() | 187 void AnimationTimeline::AnimationTimelineTiming::serviceOnNextFrame() |
| 186 { | 188 { |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 { | 325 { |
| 324 #if ENABLE(OILPAN) | 326 #if ENABLE(OILPAN) |
| 325 visitor->trace(m_document); | 327 visitor->trace(m_document); |
| 326 visitor->trace(m_timing); | 328 visitor->trace(m_timing); |
| 327 visitor->trace(m_animationsNeedingUpdate); | 329 visitor->trace(m_animationsNeedingUpdate); |
| 328 visitor->trace(m_animations); | 330 visitor->trace(m_animations); |
| 329 #endif | 331 #endif |
| 330 } | 332 } |
| 331 | 333 |
| 332 } // namespace | 334 } // namespace |
| OLD | NEW |