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

Unified Diff: third_party/WebKit/Source/core/dom/DocumentLifecycle.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
Index: third_party/WebKit/Source/core/dom/DocumentLifecycle.cpp
diff --git a/third_party/WebKit/Source/core/dom/DocumentLifecycle.cpp b/third_party/WebKit/Source/core/dom/DocumentLifecycle.cpp
index 4bcb877520a554da3b199264b6f2bcb3e42da50f..7fcdd9d92a56db6d950d2275bf9732953ff56621 100644
--- a/third_party/WebKit/Source/core/dom/DocumentLifecycle.cpp
+++ b/third_party/WebKit/Source/core/dom/DocumentLifecycle.cpp
@@ -39,7 +39,7 @@ static DocumentLifecycle::DeprecatedTransition* s_deprecatedTransitionStack = 0;
// TODO(skyostil): Come up with a better way to store cross-frame lifecycle
// related data to avoid this being a global setting.
-static unsigned s_preventThrottlingCount = 0;
+static unsigned s_allowThrottlingCount = 0;
DocumentLifecycle::Scope::Scope(DocumentLifecycle& lifecycle, State finalState)
: m_lifecycle(lifecycle)
@@ -65,15 +65,15 @@ DocumentLifecycle::DeprecatedTransition::~DeprecatedTransition()
s_deprecatedTransitionStack = m_previous;
}
-DocumentLifecycle::PreventThrottlingScope::PreventThrottlingScope(DocumentLifecycle& lifecycle)
+DocumentLifecycle::AllowThrottlingScope::AllowThrottlingScope(DocumentLifecycle& lifecycle)
{
- s_preventThrottlingCount++;
+ s_allowThrottlingCount++;
}
-DocumentLifecycle::PreventThrottlingScope::~PreventThrottlingScope()
+DocumentLifecycle::AllowThrottlingScope::~AllowThrottlingScope()
{
- ASSERT(s_preventThrottlingCount > 0);
- s_preventThrottlingCount--;
+ ASSERT(s_allowThrottlingCount > 0);
+ s_allowThrottlingCount--;
}
DocumentLifecycle::DocumentLifecycle()
@@ -283,7 +283,7 @@ void DocumentLifecycle::ensureStateAtMost(State state)
bool DocumentLifecycle::throttlingAllowed() const
{
- return !s_preventThrottlingCount;
+ return s_allowThrottlingCount;
}
#if ENABLE(ASSERT)
« no previous file with comments | « third_party/WebKit/Source/core/dom/DocumentLifecycle.h ('k') | third_party/WebKit/Source/core/frame/FrameView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698