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

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

Issue 722203004: Animations: Disable compositor when timeline playback rate is set (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix oilpan build 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 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() && timeline()->playbackRate() != 1))
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
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
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