OLD | NEW |
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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 if (nextState == InStyleRecalc) | 225 if (nextState == InStyleRecalc) |
226 return true; | 226 return true; |
227 if (nextState == InPreLayout) | 227 if (nextState == InPreLayout) |
228 return true; | 228 return true; |
229 if (nextState == InCompositingUpdate) | 229 if (nextState == InCompositingUpdate) |
230 return true; | 230 return true; |
231 if (nextState == InPaint) | 231 if (nextState == InPaint) |
232 return true; | 232 return true; |
233 break; | 233 break; |
234 case InPrePaint: | 234 case InPrePaint: |
235 if (nextState == PrePaintClean && RuntimeEnabledFeatures::slimmingPaintV
2Enabled()) | 235 if (nextState == PrePaintClean && RuntimeEnabledFeatures::slimmingPaintI
nvalidationEnabled()) |
236 return true; | 236 return true; |
237 break; | 237 break; |
238 case PrePaintClean: | 238 case PrePaintClean: |
239 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) | 239 if (!RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) |
240 break; | 240 break; |
241 if (nextState == InPaint) | 241 if (nextState == InPaint) |
242 return true; | 242 return true; |
243 if (nextState == InStyleRecalc) | 243 if (nextState == InStyleRecalc) |
244 return true; | 244 return true; |
245 if (nextState == InPreLayout) | 245 if (nextState == InPreLayout) |
246 return true; | 246 return true; |
247 if (nextState == InCompositingUpdate) | 247 if (nextState == InCompositingUpdate) |
248 return true; | 248 return true; |
249 break; | 249 break; |
(...skipping 24 matching lines...) Expand all Loading... |
274 | 274 |
275 // This transition is bogus, but we've whitelisted it anyway. | 275 // This transition is bogus, but we've whitelisted it anyway. |
276 if (s_deprecatedTransitionStack && m_state == s_deprecatedTransitionStack->f
rom() && nextState == s_deprecatedTransitionStack->to()) | 276 if (s_deprecatedTransitionStack && m_state == s_deprecatedTransitionStack->f
rom() && nextState == s_deprecatedTransitionStack->to()) |
277 return true; | 277 return true; |
278 return m_state == StyleClean | 278 return m_state == StyleClean |
279 || m_state == LayoutSubtreeChangeClean | 279 || m_state == LayoutSubtreeChangeClean |
280 || m_state == AfterPerformLayout | 280 || m_state == AfterPerformLayout |
281 || m_state == LayoutClean | 281 || m_state == LayoutClean |
282 || m_state == CompositingClean | 282 || m_state == CompositingClean |
283 || m_state == PaintInvalidationClean | 283 || m_state == PaintInvalidationClean |
| 284 || m_state == PrePaintClean |
284 || m_state == PaintClean; | 285 || m_state == PaintClean; |
285 } | 286 } |
286 | 287 |
287 #endif | 288 #endif |
288 | 289 |
289 void DocumentLifecycle::advanceTo(LifecycleState nextState) | 290 void DocumentLifecycle::advanceTo(LifecycleState nextState) |
290 { | 291 { |
291 #if DCHECK_IS_ON() | 292 #if DCHECK_IS_ON() |
292 DCHECK(canAdvanceTo(nextState)) | 293 DCHECK(canAdvanceTo(nextState)) |
293 << "Cannot advance document lifecycle from " << stateAsDebugString(m_sta
te) | 294 << "Cannot advance document lifecycle from " << stateAsDebugString(m_sta
te) |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 DEBUG_STRING_CASE(Stopping); | 344 DEBUG_STRING_CASE(Stopping); |
344 DEBUG_STRING_CASE(Stopped); | 345 DEBUG_STRING_CASE(Stopped); |
345 } | 346 } |
346 | 347 |
347 ASSERT_NOT_REACHED(); | 348 ASSERT_NOT_REACHED(); |
348 return "Unknown"; | 349 return "Unknown"; |
349 } | 350 } |
350 #endif | 351 #endif |
351 | 352 |
352 } // namespace blink | 353 } // namespace blink |
OLD | NEW |