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 20aa9f46aa577f6803618959df897b0057191936..14179308e43dd3af1d6fb11e5119257b470add04 100644 |
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp |
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp |
@@ -94,6 +94,7 @@ |
#include "core/page/scrolling/TopDocumentRootScrollerController.h" |
#include "core/paint/FramePainter.h" |
#include "core/paint/PaintLayer.h" |
+#include "core/paint/PaintTiming.h" |
#include "core/paint/PrePaintTreeWalk.h" |
#include "core/plugins/PluginView.h" |
#include "core/style/ComputedStyle.h" |
@@ -3002,6 +3003,14 @@ void FrameView::prePaint() { |
}); |
} |
+void FrameView::notifyPaint(const PaintController& paintController) const { |
+ if (Document* document = m_frame->document()) { |
+ PaintTiming::from(*document).notifyPaint(paintController.firstPainted(), |
+ paintController.textPainted(), |
+ paintController.imagePainted()); |
+ } |
+} |
+ |
void FrameView::paintTree() { |
TRACE_EVENT0("blink", "FrameView::paintTree"); |
SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Blink.Paint.UpdateTime"); |
@@ -3020,6 +3029,7 @@ void FrameView::paintTree() { |
GraphicsContext graphicsContext(*m_paintController); |
paint(graphicsContext, CullRect(LayoutRect::infiniteIntRect())); |
m_paintController->commitNewDisplayItems(LayoutSize()); |
+ notifyPaint(*m_paintController); |
} |
} else { |
// A null graphics layer can occur for painting of SVG images that are not |
@@ -3058,8 +3068,10 @@ void FrameView::paintTree() { |
} |
void FrameView::paintGraphicsLayerRecursively(GraphicsLayer* graphicsLayer) { |
- if (graphicsLayer->drawsContent()) |
+ if (graphicsLayer->drawsContent()) { |
graphicsLayer->paint(nullptr); |
+ notifyPaint(graphicsLayer->getPaintController()); |
+ } |
if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
if (GraphicsLayer* maskLayer = graphicsLayer->maskLayer()) |