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

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

Issue 2338913002: Query compositing state only from UpdateAnimationState (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/scroll/ScrollAnimatorTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 364765f85b02268e8e5f9680ddc95035ce66028b..017acf5a26bc216ea331ce295cb11af3f866ebf8 100644
--- a/third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp
+++ b/third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp
@@ -187,14 +187,8 @@ bool ScrollAnimator::willAnimateToOffset(const FloatPoint& targetPos)
m_targetOffset = targetPos;
m_startTime = m_timeFunction();
- if (registerAndScheduleAnimation()) {
- if (m_scrollableArea->shouldScrollOnMainThread()) {
- createAnimationCurve();
- m_runState = RunState::RunningOnMainThread;
- } else {
- m_runState = RunState::WaitingToSendToCompositor;
- }
- }
+ if (registerAndScheduleAnimation())
+ m_runState = RunState::WaitingToSendToCompositor;
return true;
}
@@ -304,13 +298,6 @@ void ScrollAnimator::createAnimationCurve()
void ScrollAnimator::updateCompositorAnimations()
{
ScrollAnimatorCompositorCoordinator::updateCompositorAnimations();
- if (m_runState == RunState::RunningOnMainThread) {
- // We add a temporary main thread scrolling reason so that subsequent
- // scrolls get handled on the main thread. This is removed when the
- // animation is finished in ::tickAnimation.
- addMainThreadScrollingReason();
- return;
- }
if (m_runState == RunState::PostAnimationCleanup) {
postAnimationCleanupAndReset();
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/scroll/ScrollAnimatorTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698