Chromium Code Reviews| 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; |
| } |