OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef ProgrammaticScrollAnimator_h | 5 #ifndef ProgrammaticScrollAnimator_h |
6 #define ProgrammaticScrollAnimator_h | 6 #define ProgrammaticScrollAnimator_h |
7 | 7 |
8 #include "platform/geometry/FloatPoint.h" | 8 #include "platform/geometry/FloatPoint.h" |
9 #include "wtf/FastAllocBase.h" | 9 #include "wtf/FastAllocBase.h" |
10 #include "wtf/Noncopyable.h" | 10 #include "wtf/Noncopyable.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 public: | 24 public: |
25 static PassOwnPtr<ProgrammaticScrollAnimator> create(ScrollableArea*); | 25 static PassOwnPtr<ProgrammaticScrollAnimator> create(ScrollableArea*); |
26 | 26 |
27 ~ProgrammaticScrollAnimator(); | 27 ~ProgrammaticScrollAnimator(); |
28 | 28 |
29 void animateToOffset(FloatPoint); | 29 void animateToOffset(FloatPoint); |
30 void cancelAnimation(); | 30 void cancelAnimation(); |
31 void tickAnimation(double monotonicTime); | 31 void tickAnimation(double monotonicTime); |
32 bool hasAnimationThatRequiresService() const; | 32 bool hasAnimationThatRequiresService() const; |
33 void updateCompositorAnimations(); | 33 void updateCompositorAnimations(); |
| 34 void layerForCompositedScrollingDidChange(); |
34 void notifyCompositorAnimationFinished(int groupId); | 35 void notifyCompositorAnimationFinished(int groupId); |
35 | 36 |
36 private: | 37 private: |
37 explicit ProgrammaticScrollAnimator(ScrollableArea*); | 38 explicit ProgrammaticScrollAnimator(ScrollableArea*); |
38 | 39 |
39 enum class RunState { | 40 enum class RunState { |
40 // No animation. | 41 // No animation. |
41 Idle, | 42 Idle, |
42 | 43 |
43 // Waiting to send an animation to the compositor. There might also | 44 // Waiting to send an animation to the compositor. There might also |
(...skipping 19 matching lines...) Expand all Loading... |
63 FloatPoint m_targetOffset; | 64 FloatPoint m_targetOffset; |
64 double m_startTime; | 65 double m_startTime; |
65 RunState m_runState; | 66 RunState m_runState; |
66 int m_compositorAnimationId; | 67 int m_compositorAnimationId; |
67 int m_compositorAnimationGroupId; | 68 int m_compositorAnimationGroupId; |
68 }; | 69 }; |
69 | 70 |
70 } // namespace blink | 71 } // namespace blink |
71 | 72 |
72 #endif // ProgrammaticScrollAnimator_h | 73 #endif // ProgrammaticScrollAnimator_h |
OLD | NEW |