| 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 PageAnimator_h | 5 #ifndef PageAnimator_h |
| 6 #define PageAnimator_h | 6 #define PageAnimator_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "core/animation/AnimationClock.h" | 9 #include "core/animation/AnimationClock.h" |
| 10 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 class LocalFrame; | 14 class LocalFrame; |
| 15 class Page; | 15 class Page; |
| 16 | 16 |
| 17 class CORE_EXPORT PageAnimator final : public GarbageCollected<PageAnimator> { | 17 class CORE_EXPORT PageAnimator final : public GarbageCollected<PageAnimator> { |
| 18 public: | 18 public: |
| 19 static PageAnimator* create(Page&); | 19 static PageAnimator* create(Page&); |
| 20 DECLARE_TRACE(); | 20 DECLARE_TRACE(); |
| 21 void scheduleVisualUpdate(LocalFrame*); | 21 void scheduleVisualUpdate(LocalFrame*); |
| 22 void serviceScriptedAnimations(double monotonicAnimationStartTime); | 22 void serviceScriptedAnimations(double monotonicAnimationStartTime); |
| 23 | 23 |
| 24 bool isServicingAnimations() const { return m_servicingAnimations; } | 24 bool isServicingAnimations() const { return m_servicingAnimations; } |
| 25 | 25 |
| 26 // TODO(alancutter): Remove the need for this by implementing frame request |
| 27 // suppression logic at the BeginMainFrame level. This is a temporary |
| 28 // workaround to fix a perf regression. |
| 29 // DO NOT use this outside of crbug.com/704763. |
| 30 void setSuppressFrameRequestsWorkaroundFor704763Only(bool); |
| 31 |
| 26 // See documents of methods with the same names in FrameView class. | 32 // See documents of methods with the same names in FrameView class. |
| 27 void updateAllLifecyclePhases(LocalFrame& rootFrame); | 33 void updateAllLifecyclePhases(LocalFrame& rootFrame); |
| 28 AnimationClock& clock() { return m_animationClock; } | 34 AnimationClock& clock() { return m_animationClock; } |
| 29 | 35 |
| 30 private: | 36 private: |
| 31 explicit PageAnimator(Page&); | 37 explicit PageAnimator(Page&); |
| 32 | 38 |
| 33 Member<Page> m_page; | 39 Member<Page> m_page; |
| 34 bool m_servicingAnimations; | 40 bool m_servicingAnimations; |
| 35 bool m_updatingLayoutAndStyleForPainting; | 41 bool m_updatingLayoutAndStyleForPainting; |
| 42 bool m_suppressFrameRequestsWorkaroundFor704763Only = false; |
| 36 AnimationClock m_animationClock; | 43 AnimationClock m_animationClock; |
| 37 }; | 44 }; |
| 38 | 45 |
| 39 } // namespace blink | 46 } // namespace blink |
| 40 | 47 |
| 41 #endif // PageAnimator_h | 48 #endif // PageAnimator_h |
| OLD | NEW |