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

Unified Diff: third_party/WebKit/Source/core/animation/CompositorAnimations.cpp

Issue 2578343002: Support compositing for active animations in SPv2. (Closed)
Patch Set: Created 4 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
Index: third_party/WebKit/Source/core/animation/CompositorAnimations.cpp
diff --git a/third_party/WebKit/Source/core/animation/CompositorAnimations.cpp b/third_party/WebKit/Source/core/animation/CompositorAnimations.cpp
index c3891274cc5c3929b931a1084d8e14f5547c79d6..61d0947bff02ed7bd3ab73f70681ebc8ed13f1d4 100644
--- a/third_party/WebKit/Source/core/animation/CompositorAnimations.cpp
+++ b/third_party/WebKit/Source/core/animation/CompositorAnimations.cpp
@@ -42,6 +42,7 @@
#include "core/layout/LayoutObject.h"
#include "core/layout/compositing/CompositedLayerMapping.h"
#include "core/paint/FilterEffectBuilder.h"
+#include "core/paint/ObjectPaintProperties.h"
#include "core/paint/PaintLayer.h"
#include "platform/animation/AnimationTranslationUtil.h"
#include "platform/animation/CompositorAnimation.h"
@@ -344,6 +345,14 @@ bool CompositorAnimations::canStartAnimationOnCompositor(
const Element& element) {
if (!Platform::current()->isThreadedAnimationEnabled())
return false;
+
+ if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
+ // TODO(wkorman): Consider effect node for opacity.
wkorman 2016/12/15 23:06:00 Are you adding direct compositing reasons to effec
chrishtr 2016/12/16 00:31:06 You can add it. Follow the lead of the other patch
wkorman 2016/12/16 23:08:00 Will do in subsequent change.
+ const TransformPaintPropertyNode* transformNode =
+ element.layoutObject()->paintProperties()->transform();
+ return transformNode && transformNode->hasDirectCompositingReasons();
+ }
+
return element.layoutObject() &&
element.layoutObject()->compositingState() == PaintsIntoOwnBacking;
}

Powered by Google App Engine
This is Rietveld 408576698