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 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 592 | 592 |
| 593 void AnimationPlayer::setOutdated() | 593 void AnimationPlayer::setOutdated() |
| 594 { | 594 { |
| 595 m_outdated = true; | 595 m_outdated = true; |
| 596 if (m_timeline) | 596 if (m_timeline) |
| 597 m_timeline->setOutdatedAnimationPlayer(this); | 597 m_timeline->setOutdatedAnimationPlayer(this); |
| 598 } | 598 } |
| 599 | 599 |
| 600 bool AnimationPlayer::canStartAnimationOnCompositor() | 600 bool AnimationPlayer::canStartAnimationOnCompositor() |
| 601 { | 601 { |
| 602 if (m_playbackRate == 0 || (std::isinf(sourceEnd()) && m_playbackRate < 0)) | 602 // FIXME: Timeline playback rates should be compositable |
| 603 if (m_playbackRate == 0 || (std::isinf(sourceEnd()) && m_playbackRate < 0) | | timeline()->playbackRate() != 1) | |
|
Timothy Loh
2014/11/14 03:02:12
I think we might not have a timeline here...
| |
| 603 return false; | 604 return false; |
| 604 | 605 |
| 605 return m_timeline && m_content && m_content->isAnimation() && playing(); | 606 return m_timeline && m_content && m_content->isAnimation() && playing(); |
| 606 } | 607 } |
| 607 | 608 |
| 608 bool AnimationPlayer::maybeStartAnimationOnCompositor() | 609 bool AnimationPlayer::maybeStartAnimationOnCompositor() |
| 609 { | 610 { |
| 610 if (!canStartAnimationOnCompositor()) | 611 if (!canStartAnimationOnCompositor()) |
| 611 return false; | 612 return false; |
| 612 | 613 |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 819 | 820 |
| 820 void AnimationPlayer::trace(Visitor* visitor) | 821 void AnimationPlayer::trace(Visitor* visitor) |
| 821 { | 822 { |
| 822 visitor->trace(m_content); | 823 visitor->trace(m_content); |
| 823 visitor->trace(m_timeline); | 824 visitor->trace(m_timeline); |
| 824 visitor->trace(m_pendingFinishedEvent); | 825 visitor->trace(m_pendingFinishedEvent); |
| 825 EventTargetWithInlineData::trace(visitor); | 826 EventTargetWithInlineData::trace(visitor); |
| 826 } | 827 } |
| 827 | 828 |
| 828 } // namespace | 829 } // namespace |
| OLD | NEW |