| Index: third_party/WebKit/Source/core/page/PageAnimator.h
|
| diff --git a/third_party/WebKit/Source/core/page/PageAnimator.h b/third_party/WebKit/Source/core/page/PageAnimator.h
|
| index c2e62ae89d9e3920d98c99caeb788406585ae430..bcadc374280d67678e6531810b1b716b65d5438f 100644
|
| --- a/third_party/WebKit/Source/core/page/PageAnimator.h
|
| +++ b/third_party/WebKit/Source/core/page/PageAnimator.h
|
| @@ -27,13 +27,29 @@ class CORE_EXPORT PageAnimator final : public GarbageCollected<PageAnimator> {
|
| void updateAllLifecyclePhases(LocalFrame& rootFrame);
|
| AnimationClock& clock() { return m_animationClock; }
|
|
|
| + // TODO(alancutter): Remove the need for this by moving frame request
|
| + // supression logic up to BeginMainFrame, outside of Blink entirely. This is
|
| + // exposed as a temporary workaround for a perf regression (crbug.com/704763),
|
| + // do not use this class outside of PageAnimator.cpp.
|
| + class FrameRequestSuppressionScope {
|
| + public:
|
| + STACK_ALLOCATED();
|
| + FrameRequestSuppressionScope(PageAnimator*);
|
| + ~FrameRequestSuppressionScope();
|
| +
|
| + private:
|
| + Member<PageAnimator> m_pageAnimator;
|
| + };
|
| +
|
| private:
|
| explicit PageAnimator(Page&);
|
|
|
| Member<Page> m_page;
|
| - bool m_servicingAnimations;
|
| - bool m_updatingLayoutAndStyleForPainting;
|
| + bool m_servicingAnimations = false;
|
| + size_t m_frameRequestSuppressionDepth = 0;
|
| AnimationClock m_animationClock;
|
| +
|
| + friend class FrameRequestSuppressionScope;
|
| };
|
|
|
| } // namespace blink
|
|
|