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

Unified Diff: third_party/WebKit/Source/core/animation/KeyframeEffect.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/KeyframeEffect.cpp
diff --git a/third_party/WebKit/Source/core/animation/KeyframeEffect.cpp b/third_party/WebKit/Source/core/animation/KeyframeEffect.cpp
index 4f001bcf8c8b18f03b48da622c917912d0ac9116..8be222a9c20c37a72151ba6bb694e5d554d130fd 100644
--- a/third_party/WebKit/Source/core/animation/KeyframeEffect.cpp
+++ b/third_party/WebKit/Source/core/animation/KeyframeEffect.cpp
@@ -45,6 +45,7 @@
#include "core/frame/UseCounter.h"
#include "core/paint/PaintLayer.h"
#include "core/svg/SVGElement.h"
+#include "platform/animation/CompositorAnimationPlayer.h"
namespace blink {
@@ -354,19 +355,17 @@ void KeyframeEffect::pauseAnimationForTestingOnCompositor(double pauseTime)
CompositorAnimations::instance()->pauseAnimationForTestingOnCompositor(*m_target, *animation(), compositorAnimationId, pauseTime);
}
-bool KeyframeEffect::canAttachCompositedLayers() const
+bool KeyframeEffect::canAttachCompositorPlayerToElement() const
{
- if (!m_target || !animation())
- return false;
-
- return CompositorAnimations::instance()->canAttachCompositedLayers(*m_target, *animation());
+ return m_target && animation() && animation()->compositorPlayer();
}
-void KeyframeEffect::attachCompositedLayers()
+void KeyframeEffect::attachCompositorPlayerToElement()
{
ASSERT(m_target);
ASSERT(animation());
- CompositorAnimations::instance()->attachCompositedLayers(*m_target, *animation());
+ ASSERT(animation()->compositorPlayer());
+ animation()->compositorPlayer()->attachElement(m_target->compositorElementId());
}
DEFINE_TRACE(KeyframeEffect)

Powered by Google App Engine
This is Rietveld 408576698