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

Unified Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 1696233002: Make render pipeline throttling opt-in (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Windows build fix. Created 4 years, 10 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/DocumentLifecycle.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index 8fef529d996e416d456b2efc891fcbca9a0a3156..ea7f805bbf5f360876100e88fef50b44a8d69660 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -1536,7 +1536,7 @@ void Document::scheduleLayoutTreeUpdate()
ASSERT(shouldScheduleLayoutTreeUpdate());
ASSERT(needsLayoutTreeUpdate());
- if (!view()->shouldThrottleRendering())
+ if (!view()->canThrottleRendering())
page()->animator().scheduleVisualUpdate(frame());
m_lifecycle.ensureStateAtMost(DocumentLifecycle::VisualUpdatePending);
@@ -1811,9 +1811,7 @@ void Document::updateLayoutTree(StyleRecalcChange change)
void Document::updateStyle(StyleRecalcChange change)
{
- if (view()->shouldThrottleRendering())
- return;
-
+ ASSERT(!view()->shouldThrottleRendering());
TRACE_EVENT_BEGIN0("blink,blink_style", "Document::updateStyle");
unsigned initialElementCount = styleEngine().styleForElementCount();
@@ -1917,7 +1915,6 @@ void Document::updateLayoutTreeForNodeIfNeeded(Node* node)
ASSERT(node);
if (!needsLayoutTreeUpdateForNode(*node))
return;
- DocumentLifecycle::PreventThrottlingScope preventThrottling(lifecycle());
updateLayoutTreeIfNeeded();
}
@@ -2002,7 +1999,6 @@ void Document::clearFocusedElementTimerFired(Timer<Document>*)
void Document::updateLayoutTreeIgnorePendingStylesheets()
{
StyleEngine::IgnoringPendingStylesheet ignoring(styleEngine());
- DocumentLifecycle::PreventThrottlingScope preventThrottling(lifecycle());
if (styleEngine().hasPendingSheets()) {
// FIXME: We are willing to attempt to suppress painting with outdated style info only once.
@@ -2028,8 +2024,6 @@ void Document::updateLayoutTreeIgnorePendingStylesheets()
void Document::updateLayoutIgnorePendingStylesheets(Document::RunPostLayoutTasks runPostLayoutTasks)
{
- DocumentLifecycle::PreventThrottlingScope preventThrottling(lifecycle());
-
updateLayoutTreeIgnorePendingStylesheets();
updateLayout();
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/DocumentLifecycle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698