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

Side by Side Diff: Source/core/dom/DocumentLifecycle.cpp

Issue 1238123004: Slimming Paint phase 2 compositing algorithm plumbing & skeleton display list API. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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 | Annotate | Revision Log
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 12 matching lines...) Expand all
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #include "config.h" 31 #include "config.h"
32 #include "core/dom/DocumentLifecycle.h" 32 #include "core/dom/DocumentLifecycle.h"
33 #include "platform/RuntimeEnabledFeatures.h"
33 34
34 #include "wtf/Assertions.h" 35 #include "wtf/Assertions.h"
35 36
36 namespace blink { 37 namespace blink {
37 38
38 static DocumentLifecycle::DeprecatedTransition* s_deprecatedTransitionStack = 0; 39 static DocumentLifecycle::DeprecatedTransition* s_deprecatedTransitionStack = 0;
39 40
40 DocumentLifecycle::Scope::Scope(DocumentLifecycle& lifecycle, State finalState) 41 DocumentLifecycle::Scope::Scope(DocumentLifecycle& lifecycle, State finalState)
41 : m_lifecycle(lifecycle) 42 : m_lifecycle(lifecycle)
42 , m_finalState(finalState) 43 , m_finalState(finalState)
(...skipping 28 matching lines...) Expand all
71 { 72 {
72 } 73 }
73 74
74 #if ENABLE(ASSERT) 75 #if ENABLE(ASSERT)
75 76
76 bool DocumentLifecycle::canAdvanceTo(State state) const 77 bool DocumentLifecycle::canAdvanceTo(State state) const
77 { 78 {
78 // We can stop from anywhere. 79 // We can stop from anywhere.
79 if (state == Stopping) 80 if (state == Stopping)
80 return true; 81 return true;
81
82 switch (m_state) { 82 switch (m_state) {
83 case Uninitialized: 83 case Uninitialized:
84 return state == Inactive; 84 return state == Inactive;
85 case Inactive: 85 case Inactive:
86 if (state == StyleClean) 86 if (state == StyleClean)
87 return true; 87 return true;
88 if (state == Disposed) 88 if (state == Disposed)
89 return true; 89 return true;
90 break; 90 break;
91 case VisualUpdatePending: 91 case VisualUpdatePending:
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 if (state == InPerformLayout) 165 if (state == InPerformLayout)
166 return true; 166 return true;
167 // We can redundant arrive in the layout clean state. This situation 167 // We can redundant arrive in the layout clean state. This situation
168 // can happen when we call layout recursively and we unwind the stack. 168 // can happen when we call layout recursively and we unwind the stack.
169 if (state == LayoutClean) 169 if (state == LayoutClean)
170 return true; 170 return true;
171 if (state == StyleClean) 171 if (state == StyleClean)
172 return true; 172 return true;
173 if (state == InCompositingUpdate) 173 if (state == InCompositingUpdate)
174 return true; 174 return true;
175 if (RuntimeEnabledFeatures::slimmingPaintCompositorLayerizationEnabled() && state == InPaintInvalidation)
176 return true;
175 break; 177 break;
176 case InCompositingUpdate: 178 case InCompositingUpdate:
177 return state == CompositingClean; 179 return state == CompositingClean;
178 case CompositingClean: 180 case CompositingClean:
179 if (state == InStyleRecalc) 181 if (state == InStyleRecalc)
180 return true; 182 return true;
181 if (state == InPreLayout) 183 if (state == InPreLayout)
182 return true; 184 return true;
183 if (state == InCompositingUpdate) 185 if (state == InCompositingUpdate)
184 return true; 186 return true;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 void DocumentLifecycle::ensureStateAtMost(State state) 228 void DocumentLifecycle::ensureStateAtMost(State state)
227 { 229 {
228 ASSERT(state == VisualUpdatePending || state == StyleClean || state == Layou tClean); 230 ASSERT(state == VisualUpdatePending || state == StyleClean || state == Layou tClean);
229 if (m_state <= state) 231 if (m_state <= state)
230 return; 232 return;
231 ASSERT(canRewindTo(state)); 233 ASSERT(canRewindTo(state));
232 m_state = state; 234 m_state = state;
233 } 235 }
234 236
235 } 237 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698