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

Unified Diff: third_party/WebKit/Source/platform/scroll/ScrollAnimator.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/ScrollAnimator.cpp
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp b/third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp
index 98f4e1350a715ff5aeb0842ba07932d822046528..a5fadca7e4645961f020556f1a68400926daaeb3 100644
--- a/third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp
+++ b/third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp
@@ -31,10 +31,11 @@
#include "platform/scroll/ScrollAnimator.h"
#include "platform/TraceEvent.h"
+#include "platform/animation/CompositorAnimation.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 "wtf/CurrentTime.h"
#include "wtf/PassRefPtr.h"
@@ -228,22 +229,21 @@ void ScrollAnimator::updateCompositorAnimations()
}
if (!m_animationCurve) {
- m_animationCurve = adoptPtr(Platform::current()->compositorSupport()
- ->createScrollOffsetAnimationCurve(
- m_targetOffset,
- WebCompositorAnimationCurve::TimingFunctionTypeEaseInOut,
- m_lastGranularity == ScrollByPixel ?
- WebScrollOffsetAnimationCurve::ScrollDurationInverseDelta :
- WebScrollOffsetAnimationCurve::ScrollDurationConstant));
+ m_animationCurve = adoptPtr(CompositorFactory::current().createScrollOffsetAnimationCurve(
+ m_targetOffset,
+ CompositorAnimationCurve::TimingFunctionTypeEaseInOut,
+ m_lastGranularity == ScrollByPixel ?
+ CompositorScrollOffsetAnimationCurve::ScrollDurationInverseDelta :
+ CompositorScrollOffsetAnimationCurve::ScrollDurationConstant));
m_animationCurve->setInitialValue(currentPosition());
}
bool sentToCompositor = false;
if (!m_scrollableArea->shouldScrollOnMainThread()) {
- OwnPtr<WebCompositorAnimation> animation = adoptPtr(
- Platform::current()->compositorSupport()->createAnimation(
+ OwnPtr<CompositorAnimation> animation = adoptPtr(
+ CompositorFactory::current().createAnimation(
*m_animationCurve,
- WebCompositorAnimation::TargetPropertyScrollOffset));
+ CompositorAnimation::TargetPropertyScrollOffset));
// Being here means that either there is an animation that needs
// to be sent to the compositor, or an animation that needs to
// be updated (a new scroll event before the previous animation
@@ -288,7 +288,7 @@ void ScrollAnimator::cancelAnimation()
}
void ScrollAnimator::layerForCompositedScrollingDidChange(
- WebCompositorAnimationTimeline* timeline)
+ CompositorAnimationTimeline* timeline)
{
reattachCompositorPlayerIfNeeded(timeline);
}

Powered by Google App Engine
This is Rietveld 408576698