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

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

Issue 1376143002: Add a document phase for calculating paint properties (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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/frame/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index f4e95cddf6821a06dfddb47f966c923a26c34bdc..98c3b767859b51fafa812deac8139546fc45173a 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -2437,6 +2437,9 @@ void FrameView::updateLifecyclePhasesInternal(LifeCycleUpdateOption phases, cons
updateCompositedSelectionIfNeeded();
+ if (RuntimeEnabledFeatures::slimmingPaintV2Enabled())
+ calculatePaintProperties();
+
if (RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled()) {
synchronizedPaint(interestRect);
if (RuntimeEnabledFeatures::slimmingPaintV2Enabled())
@@ -2453,6 +2456,19 @@ void FrameView::updateLifecyclePhasesInternal(LifeCycleUpdateOption phases, cons
}
}
+void FrameView::calculatePaintProperties()
+{
+ ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled());
+
+ // Detached frames can have no root graphics layer so skip even calculating paint properties.
+ if (!layoutView()->layer()->graphicsLayerBacking())
+ return;
+
+ lifecycle().advanceTo(DocumentLifecycle::InCalcPaintProps);
+ // TODO(pdr): Calculate the paint properties by walking the layout tree.
+ lifecycle().advanceTo(DocumentLifecycle::CalcPaintPropsClean);
+}
+
void FrameView::synchronizedPaint(const LayoutRect& interestRect)
{
ASSERT(RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled());

Powered by Google App Engine
This is Rietveld 408576698