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

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

Issue 734003002: Revert of Animations: Disable compositor when timeline playback rate is set (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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 | « no previous file | Source/core/animation/AnimationTimeline.cpp » ('j') | 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 581 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « no previous file | Source/core/animation/AnimationTimeline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698