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

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

Issue 1944623002: CC Animation: Use ElementId to attach CC animation players. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@erasedomids
Patch Set: Let CC clients generate their own ElementIds locally. Created 4 years, 7 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
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 fd3f332118dd73fa4655720c2944f46a511938ed..8c373f2e720204956355dfbecc90f4a9cc10f8bd 100644
--- a/third_party/WebKit/Source/core/animation/CompositorAnimations.cpp
+++ b/third_party/WebKit/Source/core/animation/CompositorAnimations.cpp
@@ -391,41 +391,6 @@ void CompositorAnimations::pauseAnimationForTestingOnCompositor(const Element& e
compositorPlayer->pauseAnimation(id, pauseTime);
}
-bool CompositorAnimations::canAttachCompositedLayers(const Element& element, const Animation& animation)
-{
- if (!animation.compositorPlayer())
- return false;
-
- if (!element.layoutObject() || !element.layoutObject()->isBoxModelObject())
- return false;
-
- PaintLayer* layer = toLayoutBoxModelObject(element.layoutObject())->layer();
-
- if (!layer || !layer->isAllowedToQueryCompositingState()
- || !layer->compositedLayerMapping()
- || !layer->compositedLayerMapping()->mainGraphicsLayer())
- return false;
-
- if (!layer->compositedLayerMapping()->mainGraphicsLayer()->platformLayer())
- return false;
-
- return true;
-}
-
-void CompositorAnimations::attachCompositedLayers(const Element& element, const Animation& animation)
-{
- ASSERT(element.layoutObject());
-
- PaintLayer* layer = toLayoutBoxModelObject(element.layoutObject())->layer();
- ASSERT(layer);
-
- CompositorAnimationPlayer* compositorPlayer = animation.compositorPlayer();
- ASSERT(compositorPlayer);
-
- ASSERT(layer->compositedLayerMapping());
- compositorPlayer->attachLayer(layer->compositedLayerMapping()->mainGraphicsLayer()->platformLayer());
-}
-
// -----------------------------------------------------------------------
// CompositorAnimationsImpl
// -----------------------------------------------------------------------

Powered by Google App Engine
This is Rietveld 408576698