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

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

Issue 2791223002: Notify Blink to suppress frame requests during BeginMainFrame (Closed)
Patch Set: DCHECK update Created 3 years, 8 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.cpp
diff --git a/third_party/WebKit/Source/core/page/PageAnimator.cpp b/third_party/WebKit/Source/core/page/PageAnimator.cpp
index b1a1f1daa2ffbed00cf4c0e51f36a9a9e80897b8..d2adf5f01178aa26730125c04b37e6bfec826d53 100644
--- a/third_party/WebKit/Source/core/page/PageAnimator.cpp
+++ b/third_party/WebKit/Source/core/page/PageAnimator.cpp
@@ -73,10 +73,21 @@ void PageAnimator::serviceScriptedAnimations(
}
}
+void PageAnimator::setSuppressFrameRequestsWorkaroundFor704763Only(
+ bool suppressFrameRequests) {
+ // If we are enabling the suppression and it was already enabled then we must
+ // have missed disabling it at the end of a previous frame.
+ DCHECK(!m_suppressFrameRequestsWorkaroundFor704763Only ||
esprehn 2017/04/05 08:33:02 This could be != Instead of the or I think?
alancutter (OOO until 2018) 2017/04/05 10:04:18 It used to be but some tests call UpdateVisualStat
+ !suppressFrameRequests);
+ m_suppressFrameRequestsWorkaroundFor704763Only = suppressFrameRequests;
+}
+
DISABLE_CFI_PERF
void PageAnimator::scheduleVisualUpdate(LocalFrame* frame) {
- if (m_servicingAnimations || m_updatingLayoutAndStyleForPainting)
+ if (m_servicingAnimations || m_updatingLayoutAndStyleForPainting ||
+ m_suppressFrameRequestsWorkaroundFor704763Only) {
return;
+ }
m_page->chromeClient().scheduleAnimation(frame->view());
}
« no previous file with comments | « third_party/WebKit/Source/core/page/PageAnimator.h ('k') | third_party/WebKit/Source/web/WebFrameWidgetImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698