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

Unified Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 2795263002: Add a new document lifecycle; CompositingInputsClean (Closed)
Patch Set: Rebase Created 3 years, 8 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/frame/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index baab752b8f688b31eea7a0544e6be4378c0bcc25..e5a5957bec0fc3030890dfcddf8cdf27c4a79411 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -2926,6 +2926,14 @@ void FrameView::UpdateLifecycleToCompositingCleanPlusScrolling() {
}
}
+void FrameView::UpdateLifecycleToCompositingInputsClean() {
+ // When SPv2 is enabled, the standard compositing lifecycle steps do not
+ // exist; compositing is done after paint instead.
+ DCHECK(!RuntimeEnabledFeatures::slimmingPaintV2Enabled());
+ GetFrame().LocalFrameRoot()->View()->UpdateLifecyclePhasesInternal(
+ DocumentLifecycle::kCompositingInputsClean);
+}
+
void FrameView::UpdateAllLifecyclePhasesExceptPaint() {
GetFrame().LocalFrameRoot()->View()->UpdateLifecyclePhasesInternal(
DocumentLifecycle::kPrePaintClean);
@@ -3030,6 +3038,7 @@ void FrameView::UpdateLifecyclePhasesInternal(
// Only the following target states are supported.
DCHECK(target_state == DocumentLifecycle::kLayoutClean ||
+ target_state == DocumentLifecycle::kCompositingInputsClean ||
target_state == DocumentLifecycle::kCompositingClean ||
target_state == DocumentLifecycle::kPrePaintClean ||
target_state == DocumentLifecycle::kPaintClean);
@@ -3079,7 +3088,7 @@ void FrameView::UpdateLifecyclePhasesInternal(
InspectorUpdateLayerTreeEvent::Data(frame_.Get()));
if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
- view.Compositor()->UpdateIfNeededRecursive();
+ view.Compositor()->UpdateIfNeededRecursive(target_state);
} else {
ForAllNonThrottledFrameViews([](FrameView& frame_view) {
frame_view.GetLayoutView()->Layer()->UpdateDescendantDependentFlags();
@@ -3087,6 +3096,12 @@ void FrameView::UpdateLifecyclePhasesInternal(
});
}
+ if (target_state == DocumentLifecycle::kCompositingInputsClean) {
+ DCHECK_EQ(Lifecycle().GetState(),
+ DocumentLifecycle::kCompositingInputsClean);
+ return;
+ }
+
ScrollContentsIfNeededRecursive();
DCHECK(RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled() ||
Lifecycle().GetState() >= DocumentLifecycle::kCompositingClean);

Powered by Google App Engine
This is Rietveld 408576698