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

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

Issue 2596623002: Create compositor animations for effect animations in SPv2. (Closed)
Patch Set: Sync to head and add node removal test. 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/animation/CompositorAnimationsTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 61d0947bff02ed7bd3ab73f70681ebc8ed13f1d4..6cb11d8f9b4916ff758cdec23ea0cad0e74525e9 100644
--- a/third_party/WebKit/Source/core/animation/CompositorAnimations.cpp
+++ b/third_party/WebKit/Source/core/animation/CompositorAnimations.cpp
@@ -347,10 +347,21 @@ bool CompositorAnimations::canStartAnimationOnCompositor(
return false;
if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
- // TODO(wkorman): Consider effect node for opacity.
+ // We query paint property tree state below to determine whether the
+ // animation is compositable. There is a known lifecycle violation where an
+ // animation can be cancelled during style update. See
+ // CompositorAnimations::cancelAnimationOnCompositor and
+ // http://crbug.com/676456. When this is fixed we would like to enable
+ // the DCHECK below.
+ // DCHECK(document().lifecycle().state() >=
+ // DocumentLifecycle::PrePaintClean);
+ const ObjectPaintProperties* paintProperties =
+ element.layoutObject()->paintProperties();
const TransformPaintPropertyNode* transformNode =
- element.layoutObject()->paintProperties()->transform();
- return transformNode && transformNode->hasDirectCompositingReasons();
+ paintProperties->transform();
+ const EffectPaintPropertyNode* effectNode = paintProperties->effect();
+ return (transformNode && transformNode->hasDirectCompositingReasons()) ||
+ (effectNode && effectNode->hasDirectCompositingReasons());
}
return element.layoutObject() &&
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/animation/CompositorAnimationsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698