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 b9b322be5b1dbb6d6cfec3aee598b8d28b9381ab..c5e9d5b01c97dcd3af8feacdb6f192da1c4ceb99 100644 |
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp |
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp |
@@ -2941,16 +2941,15 @@ void FrameView::updateLifecyclePhasesInternal( |
} |
} |
- if (targetState >= DocumentLifecycle::PrePaintClean) { |
- updatePaintProperties(); |
- } |
+ if (targetState >= DocumentLifecycle::PrePaintClean) |
+ prePaint(); |
if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) |
DocumentAnimations::updateAnimations(layoutView()->document()); |
if (targetState == DocumentLifecycle::PaintClean) { |
if (!m_frame->document()->printing()) |
- synchronizedPaint(); |
+ paint(); |
if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) |
pushPaintArtifactToCompositor(); |
@@ -2985,8 +2984,8 @@ void FrameView::performScrollAnchoringAdjustments() { |
m_anchoringAdjustmentQueue.clear(); |
} |
-void FrameView::updatePaintProperties() { |
- TRACE_EVENT0("blink", "FrameView::updatePaintProperties"); |
+void FrameView::prePaint() { |
+ TRACE_EVENT0("blink", "FrameView::prePaint"); |
if (!m_paintController) |
m_paintController = PaintController::create(); |
@@ -3003,8 +3002,8 @@ void FrameView::updatePaintProperties() { |
}); |
} |
-void FrameView::synchronizedPaint() { |
- TRACE_EVENT0("blink", "FrameView::synchronizedPaint"); |
+void FrameView::paint() { |
+ TRACE_EVENT0("blink", "FrameView::paint"); |
SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Blink.Paint.UpdateTime"); |
ASSERT(frame() == page()->mainFrame() || |
@@ -3026,11 +3025,10 @@ void FrameView::synchronizedPaint() { |
// A null graphics layer can occur for painting of SVG images that are not |
// parented into the main frame tree, or when the FrameView is the main |
// frame view of a page overlay. The page overlay is in the layer tree of |
- // the host page and will be painted during synchronized painting of the |
- // host page. |
+ // the host page and will be painted during painting of the host page. |
if (GraphicsLayer* rootGraphicsLayer = |
view.compositor()->rootGraphicsLayer()) { |
- synchronizedPaintRecursively(rootGraphicsLayer); |
+ paintGraphicsLayerRecursively(rootGraphicsLayer); |
} |
// TODO(sataya.m):Main frame doesn't create RootFrameViewport in some |
@@ -3038,15 +3036,15 @@ void FrameView::synchronizedPaint() { |
if (m_viewportScrollableArea) { |
if (GraphicsLayer* layerForHorizontalScrollbar = |
m_viewportScrollableArea->layerForHorizontalScrollbar()) { |
- synchronizedPaintRecursively(layerForHorizontalScrollbar); |
+ paintGraphicsLayerRecursively(layerForHorizontalScrollbar); |
} |
if (GraphicsLayer* layerForVerticalScrollbar = |
m_viewportScrollableArea->layerForVerticalScrollbar()) { |
- synchronizedPaintRecursively(layerForVerticalScrollbar); |
+ paintGraphicsLayerRecursively(layerForVerticalScrollbar); |
} |
if (GraphicsLayer* layerForScrollCorner = |
m_viewportScrollableArea->layerForScrollCorner()) { |
- synchronizedPaintRecursively(layerForScrollCorner); |
+ paintGraphicsLayerRecursively(layerForScrollCorner); |
} |
} |
} |
@@ -3059,20 +3057,20 @@ void FrameView::synchronizedPaint() { |
}); |
} |
-void FrameView::synchronizedPaintRecursively(GraphicsLayer* graphicsLayer) { |
+void FrameView::paintGraphicsLayerRecursively(GraphicsLayer* graphicsLayer) { |
if (graphicsLayer->drawsContent()) |
graphicsLayer->paint(nullptr); |
if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
if (GraphicsLayer* maskLayer = graphicsLayer->maskLayer()) |
- synchronizedPaintRecursively(maskLayer); |
+ paintGraphicsLayerRecursively(maskLayer); |
if (GraphicsLayer* contentsClippingMaskLayer = |
graphicsLayer->contentsClippingMaskLayer()) |
- synchronizedPaintRecursively(contentsClippingMaskLayer); |
+ paintGraphicsLayerRecursively(contentsClippingMaskLayer); |
} |
for (auto& child : graphicsLayer->children()) |
- synchronizedPaintRecursively(child); |
+ paintGraphicsLayerRecursively(child); |
} |
void FrameView::pushPaintArtifactToCompositor() { |