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

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

Issue 881183003: Animation: Cancel same-property animations on compositor (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 months 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
Index: Source/core/animation/Animation.cpp
diff --git a/Source/core/animation/Animation.cpp b/Source/core/animation/Animation.cpp
index 5af0c5d0a7d9ca2813e98b58ef69a0af407f0f3d..f9164b45f521e7de2e4f3cdec7f81aecf09d95f9 100644
--- a/Source/core/animation/Animation.cpp
+++ b/Source/core/animation/Animation.cpp
@@ -253,7 +253,7 @@ bool Animation::isCandidateForAnimationOnCompositor(double playerPlaybackRate) c
|| (m_target->renderStyle() && m_target->renderStyle()->hasMotionPath()))
return false;
- return CompositorAnimations::instance()->isCandidateForAnimationOnCompositor(specifiedTiming(), *effect(), playerPlaybackRate);
+ return CompositorAnimations::instance()->isCandidateForAnimationOnCompositor(specifiedTiming(), m_target, player(), *effect(), playerPlaybackRate);
}
bool Animation::maybeStartAnimationOnCompositor(int group, double startTime, double currentTime, double playerPlaybackRate)
@@ -263,7 +263,7 @@ bool Animation::maybeStartAnimationOnCompositor(int group, double startTime, dou
return false;
if (!CompositorAnimations::instance()->canStartAnimationOnCompositor(*m_target))
return false;
- if (!CompositorAnimations::instance()->startAnimationOnCompositor(*m_target, group, startTime, currentTime, specifiedTiming(), *effect(), m_compositorAnimationIds, playerPlaybackRate))
+ if (!CompositorAnimations::instance()->startAnimationOnCompositor(*m_target, group, startTime, currentTime, specifiedTiming(), player(), *effect(), m_compositorAnimationIds, playerPlaybackRate))
return false;
ASSERT(!m_compositorAnimationIds.isEmpty());
return true;
@@ -300,6 +300,12 @@ void Animation::cancelAnimationOnCompositor()
player()->setCompositorPending(true);
}
+void Animation::cancelAffectedAnimationsOnCompositor()
dstockwell 2015/01/28 05:44:05 I think the term 'affected' is a little strange, h
loyso (OOO) 2015/01/28 06:33:31 I'll go with 'incompatible'! See next patch set.
+{
+ if (m_target && player() && effect())
+ CompositorAnimations::instance()->cancelAffectedAnimationsOnCompositor(*m_target, *player(), *effect());
+}
+
void Animation::pauseAnimationForTestingOnCompositor(double pauseTime)
{
ASSERT(hasActiveAnimationsOnCompositor());

Powered by Google App Engine
This is Rietveld 408576698