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

Unified Diff: Source/core/rendering/RenderLayerCompositor.cpp

Issue 23874019: Web Animations CSS: Start running animations on the compositor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase and rename hasActiveAnimationOnCompositor to hasActiveAnimationsOnCompositor Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/RenderLayer.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderLayerCompositor.cpp
diff --git a/Source/core/rendering/RenderLayerCompositor.cpp b/Source/core/rendering/RenderLayerCompositor.cpp
index f09423daf3e58180322098d96b0763f2bacef042..a6cd806288b66e3ede0e92a9c7490989cfa85c7d 100644
--- a/Source/core/rendering/RenderLayerCompositor.cpp
+++ b/Source/core/rendering/RenderLayerCompositor.cpp
@@ -30,6 +30,7 @@
#include "CSSPropertyNames.h"
#include "HTMLNames.h"
#include "RuntimeEnabledFeatures.h"
+#include "core/animation/ActiveAnimations.h"
#include "core/dom/FullscreenElementStack.h"
#include "core/dom/NodeList.h"
#include "core/html/HTMLCanvasElement.h"
@@ -1678,9 +1679,13 @@ bool RenderLayerCompositor::requiresCompositingForAnimation(RenderObject* render
if (!(m_compositingTriggers & ChromeClient::AnimationTrigger))
return false;
- // FIXME: Remove this condition once force-compositing-mode is enabled on all platforms.
- bool shouldAccelerateOpacity = inCompositingMode();
- return renderer->animation().isRunningAcceleratableAnimationOnRenderer(renderer, shouldAccelerateOpacity);
+ if (!RuntimeEnabledFeatures::webAnimationsEnabled()) {
+ // FIXME: Remove this condition once force-compositing-mode is enabled on all platforms.
+ bool shouldAccelerateOpacity = inCompositingMode();
+ return renderer->animation().isRunningAcceleratableAnimationOnRenderer(renderer, shouldAccelerateOpacity);
+ }
+
+ return shouldCompositeForActiveAnimations(*renderer, inCompositingMode());
}
bool RenderLayerCompositor::requiresCompositingForTransition(RenderObject* renderer) const
@@ -1871,7 +1876,9 @@ bool RenderLayerCompositor::isRunningAcceleratedTransformAnimation(RenderObject*
{
if (!(m_compositingTriggers & ChromeClient::AnimationTrigger))
return false;
- return renderer->animation().isRunningAnimationOnRenderer(renderer, CSSPropertyWebkitTransform);
+ if (!RuntimeEnabledFeatures::webAnimationsCSSEnabled())
+ return renderer->animation().isRunningAnimationOnRenderer(renderer, CSSPropertyWebkitTransform);
+ return hasActiveAnimations(*renderer, CSSPropertyWebkitTransform);
}
// If an element has negative z-index children, those children render in front of the
« no previous file with comments | « Source/core/rendering/RenderLayer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698