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

Side by Side Diff: third_party/WebKit/Source/core/dom/DocumentLifecycle.h

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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 123
124 ~DetachScope() 124 ~DetachScope()
125 { 125 {
126 m_documentLifecycle.decrementDetachCount(); 126 m_documentLifecycle.decrementDetachCount();
127 } 127 }
128 128
129 private: 129 private:
130 DocumentLifecycle& m_documentLifecycle; 130 DocumentLifecycle& m_documentLifecycle;
131 }; 131 };
132 132
133 class PreventThrottlingScope { 133 class CORE_EXPORT AllowThrottlingScope {
134 STACK_ALLOCATED(); 134 STACK_ALLOCATED();
135 WTF_MAKE_NONCOPYABLE(PreventThrottlingScope); 135 WTF_MAKE_NONCOPYABLE(AllowThrottlingScope);
136 public: 136 public:
137 PreventThrottlingScope(DocumentLifecycle&); 137 AllowThrottlingScope(DocumentLifecycle&);
138 ~PreventThrottlingScope(); 138 ~AllowThrottlingScope();
139 }; 139 };
140 140
141 DocumentLifecycle(); 141 DocumentLifecycle();
142 ~DocumentLifecycle(); 142 ~DocumentLifecycle();
143 143
144 bool isActive() const { return m_state > Inactive && m_state < Stopping; } 144 bool isActive() const { return m_state > Inactive && m_state < Stopping; }
145 State state() const { return m_state; } 145 State state() const { return m_state; }
146 146
147 bool stateAllowsTreeMutations() const; 147 bool stateAllowsTreeMutations() const;
148 bool stateAllowsLayoutTreeMutations() const; 148 bool stateAllowsLayoutTreeMutations() const;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 return m_state != InPerformLayout 218 return m_state != InPerformLayout
219 && m_state != InCompositingUpdate 219 && m_state != InCompositingUpdate
220 && m_state != InPaintInvalidation 220 && m_state != InPaintInvalidation
221 && m_state != InUpdatePaintProperties 221 && m_state != InUpdatePaintProperties
222 && m_state != InPaint; 222 && m_state != InPaint;
223 } 223 }
224 224
225 } // namespace blink 225 } // namespace blink
226 226
227 #endif 227 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | third_party/WebKit/Source/core/dom/DocumentLifecycle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698