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

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

Issue 1196913005: Implement animations for Independent CSS Transform Properties (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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/KeyframeEffect.cpp
diff --git a/Source/core/animation/KeyframeEffect.cpp b/Source/core/animation/KeyframeEffect.cpp
index fcf364a1ed5817ef5777f49f5131967e6a63eb0a..0912219c7d5ad4f5c9915fcc75ac2b4e3fbce605 100644
--- a/Source/core/animation/KeyframeEffect.cpp
+++ b/Source/core/animation/KeyframeEffect.cpp
@@ -245,6 +245,23 @@ bool KeyframeEffect::isCandidateForAnimationOnCompositor(double animationPlaybac
|| (m_target->computedStyle() && m_target->computedStyle()->hasMotionPath()))
return false;
+ // Put transform operations on compositor iff that single transform
+ // is on ComputedStyle and that is the one being animated because we need
+ // to order the transforms correctly
+ if (m_target->computedStyle()) {
+ unsigned transformCounts = 0;
+ if (m_target->computedStyle()->rotate())
+ transformCounts++;
+ if (m_target->computedStyle()->scale())
+ transformCounts++;
+ if (m_target->computedStyle()->translate())
+ transformCounts++;
+ if (m_target->computedStyle()->hasTransformOperations())
+ transformCounts++;
+ if (transformCounts > 1)
+ return false;
+ }
Eric Willigers 2015/06/23 06:50:48 Does KeyframeEffect::applyEffects() need the same
soonm 2015/06/24 00:26:44 Will move into new methods in a new patch with com
+
return CompositorAnimations::instance()->isCandidateForAnimationOnCompositor(specifiedTiming(), *m_target, animation(), *model(), animationPlaybackRate);
}

Powered by Google App Engine
This is Rietveld 408576698