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

Unified Diff: Source/core/animation/AnimationPlayer.cpp

Issue 651103002: Web Animations: Compositor start notification should only apply to animations in a matching group (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase. Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/animation/AnimationPlayer.h ('k') | Source/core/animation/CompositorAnimations.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/AnimationPlayer.cpp
diff --git a/Source/core/animation/AnimationPlayer.cpp b/Source/core/animation/AnimationPlayer.cpp
index e16c966ad2bfc60607fe34e5e7947257a07a4f0f..79ee5a29f81a7450c68d77ab739c46a28e098588 100644
--- a/Source/core/animation/AnimationPlayer.cpp
+++ b/Source/core/animation/AnimationPlayer.cpp
@@ -77,6 +77,7 @@ AnimationPlayer::AnimationPlayer(ExecutionContext* executionContext, AnimationTi
, m_finished(true)
, m_compositorState(nullptr)
, m_compositorPending(true)
+ , m_compositorGroup(0)
, m_currentTimePending(false)
{
if (m_content) {
@@ -203,7 +204,7 @@ double AnimationPlayer::currentTimeInternal() const
return result;
}
-void AnimationPlayer::preCommit(bool startOnCompositor)
+void AnimationPlayer::preCommit(int compositorGroup, bool startOnCompositor)
{
if (m_compositorState && m_compositorState->pendingAction == Start) {
// Still waiting for a start time.
@@ -231,8 +232,11 @@ void AnimationPlayer::preCommit(bool startOnCompositor)
m_currentTimePending = false;
}
- if (shouldStart && startOnCompositor && maybeStartAnimationOnCompositor()) {
- m_compositorState = adoptPtr(new CompositorState(*this));
+ if (shouldStart) {
+ m_compositorGroup = compositorGroup;
+ if (startOnCompositor && maybeStartAnimationOnCompositor()) {
+ m_compositorState = adoptPtr(new CompositorState(*this));
+ }
}
}
@@ -623,7 +627,8 @@ bool AnimationPlayer::maybeStartAnimationOnCompositor()
timeOffset = reversed ? sourceEnd() - currentTimeInternal() : currentTimeInternal();
timeOffset = timeOffset / fabs(m_playbackRate);
}
- return toAnimation(m_content.get())->maybeStartAnimationOnCompositor(startTime, timeOffset, m_playbackRate);
+ ASSERT(m_compositorGroup != 0);
+ return toAnimation(m_content.get())->maybeStartAnimationOnCompositor(m_compositorGroup, startTime, timeOffset, m_playbackRate);
}
void AnimationPlayer::setCompositorPending(bool sourceChanged)
« no previous file with comments | « Source/core/animation/AnimationPlayer.h ('k') | Source/core/animation/CompositorAnimations.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698