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

Unified Diff: third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp

Issue 2039363003: FirstMeaningfulPaint UMA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 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/platform/graphics/GraphicsLayer.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
index e2d09012d4db17d375a4159054a3af6ff608ed3a..494b08fe2afcb9ae65eae7f2615d19ae5ccda712 100644
--- a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
+++ b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
@@ -128,8 +128,6 @@ GraphicsLayer::GraphicsLayer(GraphicsLayerClient* client)
, m_hasScrollParent(false)
, m_hasClipParent(false)
, m_painted(false)
- , m_textPainted(false)
- , m_imagePainted(false)
, m_isTrackingPaintInvalidations(client && client->isTrackingPaintInvalidations())
, m_paintingPhase(GraphicsLayerPaintAllWithOverflowClip)
, m_parent(0)
@@ -382,25 +380,19 @@ bool GraphicsLayer::paintWithoutCommit(const IntRect* interestRect, GraphicsCont
void GraphicsLayer::notifyFirstPaintToClient()
{
+ bool isFirstPaint = false;
if (!m_painted) {
DisplayItemList& itemList = m_paintController->newDisplayItemList();
for (DisplayItem& item : itemList) {
DisplayItem::Type type = item.getType();
if (DisplayItem::isDrawingType(type) && type != DisplayItem::DocumentBackground && static_cast<const DrawingDisplayItem&>(item).picture()) {
m_painted = true;
- m_client->notifyFirstPaint();
+ isFirstPaint = true;
break;
}
}
}
- if (!m_textPainted && m_paintController->textPainted()) {
- m_textPainted = true;
- m_client->notifyFirstTextPaint();
- }
- if (!m_imagePainted && m_paintController->imagePainted()) {
- m_imagePainted = true;
- m_client->notifyFirstImagePaint();
- }
+ m_client->notifyPaint(isFirstPaint, m_paintController->textPainted(), m_paintController->imagePainted());
}
void GraphicsLayer::updateChildList()

Powered by Google App Engine
This is Rietveld 408576698