Index: Source/core/animation/AnimationTimeline.cpp |
diff --git a/Source/core/animation/AnimationTimeline.cpp b/Source/core/animation/AnimationTimeline.cpp |
index 26fd46d0effcdb29f6e3f43ff0e2f33959b386b3..60741b688495b75106b56cd6e273e21e400a5864 100644 |
--- a/Source/core/animation/AnimationTimeline.cpp |
+++ b/Source/core/animation/AnimationTimeline.cpp |
@@ -38,6 +38,9 @@ |
#include "core/loader/DocumentLoader.h" |
#include "core/page/Page.h" |
#include "platform/TraceEvent.h" |
+#include "public/platform/Platform.h" |
+#include "public/platform/WebCompositorAnimationTimeline.h" |
+#include "public/platform/WebCompositorSupport.h" |
namespace blink { |
@@ -72,6 +75,9 @@ AnimationTimeline::AnimationTimeline(Document* document, PassOwnPtrWillBeRawPtr< |
else |
m_timing = timing; |
+ if (Platform::current()->compositorSupport()) |
+ m_compositorTimeline = adoptPtr(Platform::current()->compositorSupport()->createAnimationTimeline()); |
+ |
ASSERT(document); |
} |
@@ -88,6 +94,9 @@ void AnimationTimeline::playerAttached(AnimationPlayer& player) |
ASSERT(player.timeline() == this); |
ASSERT(!m_players.contains(&player)); |
m_players.add(&player); |
+ |
+ if (m_compositorTimeline) |
+ m_compositorTimeline->playerAttached(player); |
} |
AnimationPlayer* AnimationTimeline::play(AnimationNode* child) |