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

Unified Diff: third_party/WebKit/Source/platform/scroll/ProgrammaticScrollAnimator.cpp

Issue 1616653002: CC Animation: Move files from cc_blink to Source/platform/animation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Fix copyrights and years. Created 4 years, 10 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/platform/scroll/ProgrammaticScrollAnimator.cpp
diff --git a/third_party/WebKit/Source/platform/scroll/ProgrammaticScrollAnimator.cpp b/third_party/WebKit/Source/platform/scroll/ProgrammaticScrollAnimator.cpp
index 5995462da9f736baa793d14b9c1934a1f7c24d53..8f576ea30cfd09863c50d987f90a7803ad6c7801 100644
--- a/third_party/WebKit/Source/platform/scroll/ProgrammaticScrollAnimator.cpp
+++ b/third_party/WebKit/Source/platform/scroll/ProgrammaticScrollAnimator.cpp
@@ -4,13 +4,14 @@
#include "platform/scroll/ProgrammaticScrollAnimator.h"
+#include "platform/animation/CompositorAnimation.h"
+#include "platform/animation/CompositorScrollOffsetAnimationCurve.h"
#include "platform/geometry/IntPoint.h"
+#include "platform/graphics/CompositorFactory.h"
#include "platform/graphics/GraphicsLayer.h"
#include "platform/scroll/ScrollableArea.h"
#include "public/platform/Platform.h"
-#include "public/platform/WebCompositorAnimation.h"
#include "public/platform/WebCompositorSupport.h"
-#include "public/platform/WebScrollOffsetAnimationCurve.h"
namespace blink {
@@ -54,10 +55,10 @@ void ProgrammaticScrollAnimator::animateToOffset(FloatPoint offset)
m_startTime = 0.0;
m_targetOffset = offset;
- m_animationCurve = adoptPtr(Platform::current()->compositorSupport()->createScrollOffsetAnimationCurve(
+ m_animationCurve = adoptPtr(CompositorFactory::current().createScrollOffsetAnimationCurve(
m_targetOffset,
- WebCompositorAnimationCurve::TimingFunctionTypeEaseInOut,
- WebScrollOffsetAnimationCurve::ScrollDurationDeltaBased));
+ CompositorAnimationCurve::TimingFunctionTypeEaseInOut,
+ CompositorScrollOffsetAnimationCurve::ScrollDurationDeltaBased));
m_scrollableArea->registerForAnimation();
if (!m_scrollableArea->scheduleAnimation()) {
@@ -123,7 +124,7 @@ void ProgrammaticScrollAnimator::updateCompositorAnimations()
bool sentToCompositor = false;
if (!m_scrollableArea->shouldScrollOnMainThread()) {
- OwnPtr<WebCompositorAnimation> animation = adoptPtr(Platform::current()->compositorSupport()->createAnimation(*m_animationCurve, WebCompositorAnimation::TargetPropertyScrollOffset));
+ OwnPtr<CompositorAnimation> animation = adoptPtr(CompositorFactory::current().createAnimation(*m_animationCurve, CompositorAnimation::TargetPropertyScrollOffset));
int animationId = animation->id();
int animationGroupId = animation->group();
@@ -147,7 +148,7 @@ void ProgrammaticScrollAnimator::updateCompositorAnimations()
}
}
-void ProgrammaticScrollAnimator::layerForCompositedScrollingDidChange(WebCompositorAnimationTimeline* timeline)
+void ProgrammaticScrollAnimator::layerForCompositedScrollingDidChange(CompositorAnimationTimeline* timeline)
{
reattachCompositorPlayerIfNeeded(timeline);

Powered by Google App Engine
This is Rietveld 408576698