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

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

Issue 2643283003: For SPv2, attach element to compositor animation player without a CLM. (Closed)
Patch Set: Created 3 years, 11 months 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 | no next file » | 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 6cb11d8f9b4916ff758cdec23ea0cad0e74525e9..e4524c769cdcaff03ad55521107a0244dc04a9cf 100644
--- a/third_party/WebKit/Source/core/animation/CompositorAnimations.cpp
+++ b/third_party/WebKit/Source/core/animation/CompositorAnimations.cpp
@@ -444,15 +444,18 @@ void CompositorAnimations::attachCompositedLayers(Element& element,
if (!element.layoutObject() || !element.layoutObject()->isBoxModelObject())
return;
- PaintLayer* layer = toLayoutBoxModelObject(element.layoutObject())->layer();
+ // Composited animations do not depend on a composited layer mapping for SPv2.
+ if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
+ PaintLayer* layer = toLayoutBoxModelObject(element.layoutObject())->layer();
- if (!layer || !layer->isAllowedToQueryCompositingState() ||
- !layer->compositedLayerMapping() ||
- !layer->compositedLayerMapping()->mainGraphicsLayer())
- return;
+ if (!layer || !layer->isAllowedToQueryCompositingState() ||
+ !layer->compositedLayerMapping() ||
+ !layer->compositedLayerMapping()->mainGraphicsLayer())
+ return;
- if (!layer->compositedLayerMapping()->mainGraphicsLayer()->platformLayer())
- return;
+ if (!layer->compositedLayerMapping()->mainGraphicsLayer()->platformLayer())
+ return;
+ }
CompositorAnimationPlayer* compositorPlayer = animation.compositorPlayer();
compositorPlayer->attachElement(createCompositorElementId(
wkorman 2017/01/20 23:45:47 This will end up at this check: https://cs.chro
loyso (OOO) 2017/01/24 00:48:20 cc::AnimationPlayer::animation_host_ is not nullpt
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698