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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 ? currentTime | 234 ? currentTime |
235 : document()->animationClock().currentTime() - | 235 : document()->animationClock().currentTime() - |
236 currentTime / m_playbackRate; | 236 currentTime / m_playbackRate; |
237 m_zeroTimeInitialized = true; | 237 m_zeroTimeInitialized = true; |
238 | 238 |
239 for (const auto& animation : m_animations) { | 239 for (const auto& animation : m_animations) { |
240 // The Player needs a timing update to pick up a new time. | 240 // The Player needs a timing update to pick up a new time. |
241 animation->setOutdated(); | 241 animation->setOutdated(); |
242 } | 242 } |
243 | 243 |
244 // Any corresponding compositor animation will need to be restarted. Marking t
he | 244 // Any corresponding compositor animation will need to be restarted. Marking |
245 // effect changed forces this. | 245 // the effect changed forces this. |
246 setAllCompositorPending(true); | 246 setAllCompositorPending(true); |
247 } | 247 } |
248 | 248 |
249 double AnimationTimeline::effectiveTime() { | 249 double AnimationTimeline::effectiveTime() { |
250 double time = currentTimeInternal(); | 250 double time = currentTimeInternal(); |
251 return std::isnan(time) ? 0 : time; | 251 return std::isnan(time) ? 0 : time; |
252 } | 252 } |
253 | 253 |
254 void AnimationTimeline::pauseAnimationsForTesting(double pauseTime) { | 254 void AnimationTimeline::pauseAnimationsForTesting(double pauseTime) { |
255 for (const auto& animation : m_animationsNeedingUpdate) | 255 for (const auto& animation : m_animationsNeedingUpdate) |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 } | 318 } |
319 | 319 |
320 DEFINE_TRACE(AnimationTimeline) { | 320 DEFINE_TRACE(AnimationTimeline) { |
321 visitor->trace(m_document); | 321 visitor->trace(m_document); |
322 visitor->trace(m_timing); | 322 visitor->trace(m_timing); |
323 visitor->trace(m_animationsNeedingUpdate); | 323 visitor->trace(m_animationsNeedingUpdate); |
324 visitor->trace(m_animations); | 324 visitor->trace(m_animations); |
325 } | 325 } |
326 | 326 |
327 } // namespace blink | 327 } // namespace blink |
OLD | NEW |