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

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

Issue 23874019: Web Animations CSS: Start running animations on the compositor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Cleanup isRunning* and shouldCompositeForAnimation 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
Index: Source/core/rendering/RenderLayer.cpp
diff --git a/Source/core/rendering/RenderLayer.cpp b/Source/core/rendering/RenderLayer.cpp
index 138492f7ba689979912345c5a6ca2640ba8c27ca..7288af54a394f20ac1c9704c054302c4c4b9bcb3 100644
--- a/Source/core/rendering/RenderLayer.cpp
+++ b/Source/core/rendering/RenderLayer.cpp
@@ -48,6 +48,7 @@
#include "HTMLNames.h"
#include "RuntimeEnabledFeatures.h"
#include "SVGNames.h"
+#include "core/animation/ActiveAnimations.h"
#include "core/css/PseudoStyleRequest.h"
#include "core/dom/Document.h"
#include "core/dom/shadow/ShadowRoot.h"
@@ -575,7 +576,8 @@ TransformationMatrix RenderLayer::currentTransform(RenderStyle::ApplyTransformOr
if (!m_transform)
return TransformationMatrix();
- if (renderer()->style()->isRunningAcceleratedAnimation()) {
+ // FIXME: handle this under web-animations
Steve Block 2013/11/18 05:03:03 How does this affect behavior? Is it flag-flip blo
dstockwell 2013/11/18 06:11:20 Unclear, needs further investigation :(
+ if (!RuntimeEnabledFeatures::webAnimationsEnabled() && renderer()->style()->isRunningAcceleratedAnimation()) {
TransformationMatrix currTransform;
RefPtr<RenderStyle> style = renderer()->animation().getAnimatedStyleForRenderer(renderer());
style->applyTransform(currTransform, renderBox()->pixelSnappedBorderBoxRect().size(), applyOrigin);
@@ -3919,7 +3921,7 @@ inline bool RenderLayer::needsCompositingLayersRebuiltForFilters(const RenderSty
if (!hasOrHadFilters(oldStyle, newStyle))
return false;
- if (renderer()->animation().isRunningAcceleratedAnimationOnRenderer(renderer(), CSSPropertyWebkitFilter)) {
+ if (isRunningCompositorAnimation(*renderer(), CSSPropertyWebkitFilter)) {
// When the compositor is performing the filter animation, we shouldn't touch the compositing layers.
// All of the layers above us should have been promoted to compositing layers already.
return false;
@@ -3955,8 +3957,7 @@ void RenderLayer::updateFilters(const RenderStyle* oldStyle, const RenderStyle*
updateOrRemoveFilterClients();
// During an accelerated animation, both WebKit and the compositor animate properties.
// However, WebKit shouldn't ask the compositor to update its filters if the compositor is performing the animation.
- bool shouldUpdateFilters = hasCompositedLayerMapping() && !renderer()->animation().isRunningAcceleratedAnimationOnRenderer(renderer(), CSSPropertyWebkitFilter);
- if (shouldUpdateFilters)
+ if (hasCompositedLayerMapping() && !isRunningCompositorAnimation(*renderer(), CSSPropertyWebkitFilter))
compositedLayerMapping()->updateFilters(renderer()->style());
updateOrRemoveFilterEffectRenderer();
}

Powered by Google App Engine
This is Rietveld 408576698