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

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

Issue 2322073006: Turn off the old compositing path for SPv2. (Closed)
Patch Set: none Created 4 years, 3 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 // We can synchronously perform layout. 136 // We can synchronously perform layout.
137 if (nextState == InPreLayout) 137 if (nextState == InPreLayout)
138 return true; 138 return true;
139 if (nextState == InPerformLayout) 139 if (nextState == InPerformLayout)
140 return true; 140 return true;
141 // We can redundant arrive in the style clean state. 141 // We can redundant arrive in the style clean state.
142 if (nextState == StyleClean) 142 if (nextState == StyleClean)
143 return true; 143 return true;
144 if (nextState == LayoutClean) 144 if (nextState == LayoutClean)
145 return true; 145 return true;
146 if (nextState == InCompositingUpdate) 146 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() && nextState == In CompositingUpdate)
147 return true;
148 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled() && nextState == InP rePaint)
147 return true; 149 return true;
148 break; 150 break;
149 case InLayoutSubtreeChange: 151 case InLayoutSubtreeChange:
150 return nextState == LayoutSubtreeChangeClean; 152 return nextState == LayoutSubtreeChangeClean;
151 case LayoutSubtreeChangeClean: 153 case LayoutSubtreeChangeClean:
152 // We can synchronously recalc style. 154 // We can synchronously recalc style.
153 if (nextState == InStyleRecalc) 155 if (nextState == InStyleRecalc)
154 return true; 156 return true;
155 // We can synchronously perform layout. 157 // We can synchronously perform layout.
156 if (nextState == InPreLayout) 158 if (nextState == InPreLayout)
157 return true; 159 return true;
158 if (nextState == InPerformLayout) 160 if (nextState == InPerformLayout)
159 return true; 161 return true;
160 // Can move back to style clean. 162 // Can move back to style clean.
161 if (nextState == StyleClean) 163 if (nextState == StyleClean)
162 return true; 164 return true;
163 if (nextState == LayoutClean) 165 if (nextState == LayoutClean)
164 return true; 166 return true;
165 if (nextState == InCompositingUpdate) 167 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() && nextState == In CompositingUpdate)
168 return true;
169 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled() && nextState == InP rePaint)
166 return true; 170 return true;
167 break; 171 break;
168 case InPreLayout: 172 case InPreLayout:
169 if (nextState == InStyleRecalc) 173 if (nextState == InStyleRecalc)
170 return true; 174 return true;
171 if (nextState == StyleClean) 175 if (nextState == StyleClean)
172 return true; 176 return true;
173 if (nextState == InPreLayout) 177 if (nextState == InPreLayout)
174 return true; 178 return true;
175 break; 179 break;
(...skipping 15 matching lines...) Expand all
191 if (nextState == InPreLayout) 195 if (nextState == InPreLayout)
192 return true; 196 return true;
193 if (nextState == InPerformLayout) 197 if (nextState == InPerformLayout)
194 return true; 198 return true;
195 // We can redundantly arrive in the layout clean state. This situation 199 // We can redundantly arrive in the layout clean state. This situation
196 // can happen when we call layout recursively and we unwind the stack. 200 // can happen when we call layout recursively and we unwind the stack.
197 if (nextState == LayoutClean) 201 if (nextState == LayoutClean)
198 return true; 202 return true;
199 if (nextState == StyleClean) 203 if (nextState == StyleClean)
200 return true; 204 return true;
201 if (nextState == InCompositingUpdate) 205 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() && nextState == In CompositingUpdate)
206 return true;
207 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled() && nextState == InP rePaint)
202 return true; 208 return true;
203 break; 209 break;
204 case InCompositingUpdate: 210 case InCompositingUpdate:
211 DCHECK(!RuntimeEnabledFeatures::slimmingPaintV2Enabled());
205 return nextState == CompositingClean; 212 return nextState == CompositingClean;
206 case CompositingClean: 213 case CompositingClean:
214 DCHECK(!RuntimeEnabledFeatures::slimmingPaintV2Enabled());
207 if (nextState == InStyleRecalc) 215 if (nextState == InStyleRecalc)
208 return true; 216 return true;
209 if (nextState == InPreLayout) 217 if (nextState == InPreLayout)
210 return true; 218 return true;
211 if (nextState == InCompositingUpdate) 219 if (nextState == InCompositingUpdate)
212 return true; 220 return true;
213 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) { 221 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) {
214 if (nextState == InPrePaint) 222 if (nextState == InPrePaint)
215 return true; 223 return true;
216 } else if (nextState == InPaintInvalidation) { 224 } else if (nextState == InPaintInvalidation) {
217 return true; 225 return true;
218 } 226 }
219 break; 227 break;
220 case InPaintInvalidation: 228 case InPaintInvalidation:
221 DCHECK(!RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()); 229 DCHECK(!RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled());
222 return nextState == PaintInvalidationClean; 230 return nextState == PaintInvalidationClean;
223 case PaintInvalidationClean: 231 case PaintInvalidationClean:
224 DCHECK(!RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()); 232 DCHECK(!RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled());
225 if (nextState == InStyleRecalc) 233 if (nextState == InStyleRecalc)
226 return true; 234 return true;
227 if (nextState == InPreLayout) 235 if (nextState == InPreLayout)
228 return true; 236 return true;
229 if (nextState == InCompositingUpdate) 237 if (nextState == InCompositingUpdate)
230 return true; 238 return true;
231 if (nextState == InPaint) 239 if (nextState == InPrePaint)
232 return true; 240 return true;
233 break; 241 break;
234 case InPrePaint: 242 case InPrePaint:
235 if (nextState == PrePaintClean && RuntimeEnabledFeatures::slimmingPaintI nvalidationEnabled()) 243 if (nextState == PrePaintClean)
236 return true; 244 return true;
237 break; 245 break;
238 case PrePaintClean: 246 case PrePaintClean:
239 if (!RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled())
240 break;
241 if (nextState == InPaint) 247 if (nextState == InPaint)
242 return true; 248 return true;
243 if (nextState == InStyleRecalc) 249 if (nextState == InStyleRecalc)
244 return true; 250 return true;
245 if (nextState == InPreLayout) 251 if (nextState == InPreLayout)
246 return true; 252 return true;
247 if (nextState == InCompositingUpdate) 253 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() && nextState == In CompositingUpdate)
254 return true;
255 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled() && nextState == InP rePaint)
248 return true; 256 return true;
249 break; 257 break;
250 case InPaint: 258 case InPaint:
251 if (nextState == PaintClean) 259 if (nextState == PaintClean)
252 return true; 260 return true;
253 break; 261 break;
254 case PaintClean: 262 case PaintClean:
255 if (nextState == InStyleRecalc) 263 if (nextState == InStyleRecalc)
256 return true; 264 return true;
257 if (nextState == InPreLayout) 265 if (nextState == InPreLayout)
258 return true; 266 return true;
259 if (nextState == InCompositingUpdate) 267 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() && nextState == In CompositingUpdate)
268 return true;
269 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled() && nextState == InP rePaint)
260 return true; 270 return true;
261 break; 271 break;
262 case Stopping: 272 case Stopping:
263 return nextState == Stopped; 273 return nextState == Stopped;
264 case Stopped: 274 case Stopped:
265 return false; 275 return false;
266 } 276 }
267 return false; 277 return false;
268 } 278 }
269 279
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 DEBUG_STRING_CASE(Stopping); 354 DEBUG_STRING_CASE(Stopping);
345 DEBUG_STRING_CASE(Stopped); 355 DEBUG_STRING_CASE(Stopped);
346 } 356 }
347 357
348 ASSERT_NOT_REACHED(); 358 ASSERT_NOT_REACHED();
349 return "Unknown"; 359 return "Unknown";
350 } 360 }
351 #endif 361 #endif
352 362
353 } // namespace blink 363 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698