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

Side by Side Diff: Source/core/animation/AnimationTimeline.cpp

Issue 1287013003: Ensure serviceOnNextFrame isn't put off indefinitely. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Adjust layout test Created 5 years, 4 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 | « LayoutTests/virtual/threaded/transitions/composited-with-hit-testing-expected.txt ('k') | no next file » | 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « LayoutTests/virtual/threaded/transitions/composited-with-hit-testing-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698