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

Unified Diff: third_party/WebKit/Source/core/page/PageAnimator.h

Issue 2794803002: Suppress frame requests in InputMethodController::textInputType() (Closed)
Patch Set: InputMethodController::textInputType() Created 3 years, 9 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/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
« no previous file with comments | « third_party/WebKit/Source/core/editing/InputMethodController.cpp ('k') | third_party/WebKit/Source/core/page/PageAnimator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698