Chromium Code Reviews| 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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 278 toAnimation(m_content.get())->cancelAnimationOnCompositor(); | 278 toAnimation(m_content.get())->cancelAnimationOnCompositor(); |
| 279 } | 279 } |
| 280 | 280 |
| 281 bool AnimationPlayer::update() | 281 bool AnimationPlayer::update() |
| 282 { | 282 { |
| 283 m_outdated = false; | 283 m_outdated = false; |
| 284 | 284 |
| 285 if (!m_timeline || !m_content) | 285 if (!m_timeline || !m_content) |
| 286 return false; | 286 return false; |
| 287 | 287 |
| 288 double inheritedTime = isNull(m_timeline->currentTime()) ? nullValue() : cur rentTime(); | 288 bool isNullTime; |
| 289 m_timeline->currentTime(isNullTime); | |
|
dstockwell
2014/03/31 23:33:29
Doesn't the old way still work?
Seems like this c
Eric Willigers
2014/04/01 01:15:45
Done.
| |
| 290 double inheritedTime = isNullTime ? nullValue() : currentTime(); | |
| 291 | |
| 289 m_content->updateInheritedTime(inheritedTime); | 292 m_content->updateInheritedTime(inheritedTime); |
| 290 | 293 |
| 291 ASSERT(!m_outdated); | 294 ASSERT(!m_outdated); |
| 292 return m_content->isCurrent() || m_content->isInEffect(); | 295 return m_content->isCurrent() || m_content->isInEffect(); |
| 293 } | 296 } |
| 294 | 297 |
| 295 double AnimationPlayer::timeToEffectChange() | 298 double AnimationPlayer::timeToEffectChange() |
| 296 { | 299 { |
| 297 ASSERT(!m_outdated); | 300 ASSERT(!m_outdated); |
| 298 if (!m_content || !m_playbackRate) | 301 if (!m_content || !m_playbackRate) |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 326 { | 329 { |
| 327 RELEASE_ASSERT(!paused()); | 330 RELEASE_ASSERT(!paused()); |
| 328 updateTimingState(pauseTime); | 331 updateTimingState(pauseTime); |
| 329 if (!m_isPausedForTesting && hasActiveAnimationsOnCompositor()) | 332 if (!m_isPausedForTesting && hasActiveAnimationsOnCompositor()) |
| 330 toAnimation(m_content.get())->pauseAnimationForTestingOnCompositor(curre ntTime()); | 333 toAnimation(m_content.get())->pauseAnimationForTestingOnCompositor(curre ntTime()); |
| 331 m_isPausedForTesting = true; | 334 m_isPausedForTesting = true; |
| 332 pause(); | 335 pause(); |
| 333 } | 336 } |
| 334 | 337 |
| 335 } // namespace | 338 } // namespace |
| OLD | NEW |