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

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

Issue 1734063003: Share animations from compositor to main thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix win trybot failure 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.h
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollAnimator.h b/third_party/WebKit/Source/platform/scroll/ScrollAnimator.h
index 18469bd8b62264e91bb39445364dab045cdf17d7..2084860ebd6547a512bc568d22b3772f70c24821 100644
--- a/third_party/WebKit/Source/platform/scroll/ScrollAnimator.h
+++ b/third_party/WebKit/Source/platform/scroll/ScrollAnimator.h
@@ -67,6 +67,11 @@ public:
DECLARE_VIRTUAL_TRACE();
protected:
+ void notifyAnimationTakeover(
+ double monotonicTime,
+ double animationStartTime,
+ scoped_ptr<cc::AnimationCurve>) override;
+
OwnPtr<CompositorScrollOffsetAnimationCurve> m_animationCurve;
double m_startTime;
WTF::TimeFunction m_timeFunction;
@@ -82,6 +87,11 @@ private:
void addMainThreadScrollingReason();
void removeMainThreadScrollingReason();
+ // Returns true if will animate to the given target position. Returns false
+ // only when there is no animation running and we are not starting one
+ // because we are already at targetPos.
+ bool willAnimateToOffset(const FloatPoint& targetPos);
+
FloatPoint m_targetOffset;
ScrollGranularity m_lastGranularity;
};

Powered by Google App Engine
This is Rietveld 408576698