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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/DocumentLifecycle.cpp
diff --git a/third_party/WebKit/Source/core/dom/DocumentLifecycle.cpp b/third_party/WebKit/Source/core/dom/DocumentLifecycle.cpp
index 49455873f68fb6a182ee30e318a75d45e4ca2302..9a330dd5e9459570bfe0bb3967922f0cd7c66773 100644
--- a/third_party/WebKit/Source/core/dom/DocumentLifecycle.cpp
+++ b/third_party/WebKit/Source/core/dom/DocumentLifecycle.cpp
@@ -143,7 +143,9 @@ bool DocumentLifecycle::canAdvanceTo(LifecycleState nextState) const
return true;
if (nextState == LayoutClean)
return true;
- if (nextState == InCompositingUpdate)
+ if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() && nextState == InCompositingUpdate)
+ return true;
+ if (RuntimeEnabledFeatures::slimmingPaintV2Enabled() && nextState == InPrePaint)
return true;
break;
case InLayoutSubtreeChange:
@@ -162,7 +164,9 @@ bool DocumentLifecycle::canAdvanceTo(LifecycleState nextState) const
return true;
if (nextState == LayoutClean)
return true;
- if (nextState == InCompositingUpdate)
+ if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() && nextState == InCompositingUpdate)
+ return true;
+ if (RuntimeEnabledFeatures::slimmingPaintV2Enabled() && nextState == InPrePaint)
return true;
break;
case InPreLayout:
@@ -198,12 +202,16 @@ bool DocumentLifecycle::canAdvanceTo(LifecycleState nextState) const
return true;
if (nextState == StyleClean)
return true;
- if (nextState == InCompositingUpdate)
+ if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() && nextState == InCompositingUpdate)
+ return true;
+ if (RuntimeEnabledFeatures::slimmingPaintV2Enabled() && nextState == InPrePaint)
return true;
break;
case InCompositingUpdate:
+ DCHECK(!RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled());
Xianzhu 2016/09/14 00:35:53 We still need CompositingUpdate for slimmingPaintI
chrishtr 2016/09/14 19:43:24 Fixed.
return nextState == CompositingClean;
case CompositingClean:
+ DCHECK(!RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled());
Xianzhu 2016/09/14 00:35:53 Ditto.
chrishtr 2016/09/14 19:43:24 Fixed.
if (nextState == InStyleRecalc)
return true;
if (nextState == InPreLayout)
@@ -244,7 +252,9 @@ bool DocumentLifecycle::canAdvanceTo(LifecycleState nextState) const
return true;
if (nextState == InPreLayout)
return true;
- if (nextState == InCompositingUpdate)
+ if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() && nextState == InCompositingUpdate)
+ return true;
+ if (RuntimeEnabledFeatures::slimmingPaintV2Enabled() && nextState == InPrePaint)
return true;
break;
case InPaint:
@@ -256,7 +266,9 @@ bool DocumentLifecycle::canAdvanceTo(LifecycleState nextState) const
return true;
if (nextState == InPreLayout)
return true;
- if (nextState == InCompositingUpdate)
+ if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() && nextState == InCompositingUpdate)
+ return true;
+ if (RuntimeEnabledFeatures::slimmingPaintV2Enabled() && nextState == InPrePaint)
return true;
break;
case Stopping:
@@ -281,7 +293,8 @@ bool DocumentLifecycle::canRewindTo(LifecycleState nextState) const
|| m_state == LayoutClean
|| m_state == CompositingClean
|| m_state == PaintInvalidationClean
- || m_state == PaintClean;
+ || m_state == PaintClean
+ || (RuntimeEnabledFeatures::slimmingPaintV2Enabled() && m_state == PrePaintClean);
}
#endif

Powered by Google App Engine
This is Rietveld 408576698