Index: Source/platform/scroll/ProgrammaticScrollAnimator.h |
diff --git a/Source/platform/scroll/ProgrammaticScrollAnimator.h b/Source/platform/scroll/ProgrammaticScrollAnimator.h |
index a37d9b374e94d6de1965a405b53f6586abea54c7..538077d0394922f78c6f2726bb27e2dacafaf276 100644 |
--- a/Source/platform/scroll/ProgrammaticScrollAnimator.h |
+++ b/Source/platform/scroll/ProgrammaticScrollAnimator.h |
@@ -29,17 +29,42 @@ public: |
void animateToOffset(FloatPoint); |
void cancelAnimation(); |
void tickAnimation(double monotonicTime); |
- bool hasRunningAnimation() const; |
+ bool hasAnimationThatRequiresService() const; |
+ void updateCompositorAnimations(); |
+ void notifyCompositorAnimationFinished(int groupId); |
private: |
explicit ProgrammaticScrollAnimator(ScrollableArea*); |
+ enum class RunState { |
+ // No animation. |
+ Idle, |
+ |
+ // Waiting to send an animation to the compositor. There might also |
+ // already be another animation running on the compositor that will need |
+ // to be canceled first. |
+ WaitingToSendToCompositor, |
+ |
+ // Running an animation on the compositor. |
+ RunningOnCompositor, |
+ |
+ // Running an animation on the main thread. |
+ RunningOnMainThread, |
+ |
+ // Waiting to cancel the animation currently running on the compositor. |
+ // There is no pending animation to replace the canceled animation. |
+ WaitingToCancelOnCompositor |
+ }; |
+ |
void resetAnimationState(); |
ScrollableArea* m_scrollableArea; |
OwnPtr<WebScrollOffsetAnimationCurve> m_animationCurve; |
FloatPoint m_targetOffset; |
double m_startTime; |
+ RunState m_runState; |
+ int m_compositorAnimationId; |
+ int m_compositorAnimationGroupId; |
}; |
} // namespace blink |