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

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: Created 4 years, 8 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 9696eac0d44430a4da3b25330f875e777077fa14..cc2dd38e22de4b7ab1c287168c94e0b03e3d9bdf 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 {
@@ -352,19 +353,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