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

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

Issue 1663963004: Blink Compositor Animation: Use PassOwnPtr in CompositorFactory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@curves
Patch Set: Created 4 years, 11 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 9e401255b04aefb168f72005c371236b54b6a23c..df19b1e993c977e61e8b4d839daf3fff46c28ae4 100644
--- a/third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp
+++ b/third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp
@@ -225,21 +225,20 @@ void ScrollAnimator::updateCompositorAnimations()
}
if (!m_animationCurve) {
- m_animationCurve = adoptPtr(CompositorFactory::current().createScrollOffsetAnimationCurve(
+ m_animationCurve = CompositorFactory::current().createScrollOffsetAnimationCurve(
m_targetOffset,
CompositorAnimationCurve::TimingFunctionTypeEaseInOut,
m_lastGranularity == ScrollByPixel ?
CompositorScrollOffsetAnimationCurve::ScrollDurationInverseDelta :
- CompositorScrollOffsetAnimationCurve::ScrollDurationConstant));
+ CompositorScrollOffsetAnimationCurve::ScrollDurationConstant);
m_animationCurve->setInitialValue(currentPosition());
}
bool sentToCompositor = false;
if (!m_scrollableArea->shouldScrollOnMainThread()) {
- OwnPtr<CompositorAnimation> animation = adoptPtr(
- CompositorFactory::current().createAnimation(
- *m_animationCurve,
- CompositorAnimation::TargetPropertyScrollOffset));
+ OwnPtr<CompositorAnimation> animation = CompositorFactory::current().createAnimation(
+ *m_animationCurve,
+ 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

Powered by Google App Engine
This is Rietveld 408576698