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 // FIXME: Timeline playback rates should be compositable | 602 if (m_playbackRate == 0 || (std::isinf(sourceEnd()) && m_playbackRate < 0)) |
603 if (m_playbackRate == 0 || (std::isinf(sourceEnd()) && m_playbackRate < 0) |
| (timeline() && timeline()->playbackRate() != 1)) | |
604 return false; | 603 return false; |
605 | 604 |
606 return m_timeline && m_content && m_content->isAnimation() && playing(); | 605 return m_timeline && m_content && m_content->isAnimation() && playing(); |
607 } | 606 } |
608 | 607 |
609 bool AnimationPlayer::maybeStartAnimationOnCompositor() | 608 bool AnimationPlayer::maybeStartAnimationOnCompositor() |
610 { | 609 { |
611 if (!canStartAnimationOnCompositor()) | 610 if (!canStartAnimationOnCompositor()) |
612 return false; | 611 return false; |
613 | 612 |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
820 | 819 |
821 void AnimationPlayer::trace(Visitor* visitor) | 820 void AnimationPlayer::trace(Visitor* visitor) |
822 { | 821 { |
823 visitor->trace(m_content); | 822 visitor->trace(m_content); |
824 visitor->trace(m_timeline); | 823 visitor->trace(m_timeline); |
825 visitor->trace(m_pendingFinishedEvent); | 824 visitor->trace(m_pendingFinishedEvent); |
826 EventTargetWithInlineData::trace(visitor); | 825 EventTargetWithInlineData::trace(visitor); |
827 } | 826 } |
828 | 827 |
829 } // namespace | 828 } // namespace |
OLD | NEW |