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

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

Issue 1534813004: Run smooth scroll animations on the compositor when possible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 5 years 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 f4a0af17641114168a3acfc23552c684be800f1c..695718ddd33e28c9bddcf78fb6e97fb984b9d00d 100644
--- a/third_party/WebKit/Source/platform/scroll/ProgrammaticScrollAnimator.cpp
+++ b/third_party/WebKit/Source/platform/scroll/ProgrammaticScrollAnimator.cpp
@@ -65,6 +65,12 @@ void ProgrammaticScrollAnimator::animateToOffset(FloatPoint offset)
m_runState = RunState::WaitingToSendToCompositor;
}
+void ProgrammaticScrollAnimator::cancelAnimation()
+{
+ ASSERT(m_runState != RunState::RunningOnCompositorButNeedsUpdate);
+ ScrollAnimatorCompositorCoordinator::cancelAnimation();
+}
+
void ProgrammaticScrollAnimator::tickAnimation(double monotonicTime)
{
if (m_runState != RunState::RunningOnMainThread)
@@ -155,6 +161,7 @@ void ProgrammaticScrollAnimator::layerForCompositedScrollingDidChange(WebComposi
void ProgrammaticScrollAnimator::notifyCompositorAnimationFinished(int groupId)
{
+ ASSERT(m_runState != RunState::RunningOnCompositorButNeedsUpdate);
ScrollAnimatorCompositorCoordinator::compositorAnimationFinished(groupId);
}

Powered by Google App Engine
This is Rietveld 408576698