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

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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 if (state == InPerformLayout) 166 if (state == InPerformLayout)
166 return true; 167 return true;
167 // We can redundant arrive in the layout clean state. This situation 168 // We can redundant arrive in the layout clean state. This situation
168 // can happen when we call layout recursively and we unwind the stack. 169 // can happen when we call layout recursively and we unwind the stack.
169 if (state == LayoutClean) 170 if (state == LayoutClean)
170 return true; 171 return true;
171 if (state == StyleClean) 172 if (state == StyleClean)
172 return true; 173 return true;
173 if (state == InCompositingUpdate) 174 if (state == InCompositingUpdate)
174 return true; 175 return true;
176 if (RuntimeEnabledFeatures::slimmingPaintCompositorLayerizationEnabled() && state == InPaintInvalidation)
177 return true;
175 break; 178 break;
176 case InCompositingUpdate: 179 case InCompositingUpdate:
177 return state == CompositingClean; 180 return state == CompositingClean;
178 case CompositingClean: 181 case CompositingClean:
179 if (state == InStyleRecalc) 182 if (state == InStyleRecalc)
180 return true; 183 return true;
181 if (state == InPreLayout) 184 if (state == InPreLayout)
182 return true; 185 return true;
183 if (state == InCompositingUpdate) 186 if (state == InCompositingUpdate)
184 return true; 187 return true;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 void DocumentLifecycle::ensureStateAtMost(State state) 229 void DocumentLifecycle::ensureStateAtMost(State state)
227 { 230 {
228 ASSERT(state == VisualUpdatePending || state == StyleClean || state == Layou tClean); 231 ASSERT(state == VisualUpdatePending || state == StyleClean || state == Layou tClean);
229 if (m_state <= state) 232 if (m_state <= state)
230 return; 233 return;
231 ASSERT(canRewindTo(state)); 234 ASSERT(canRewindTo(state));
232 m_state = state; 235 m_state = state;
233 } 236 }
234 237
235 } 238 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698