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

Unified Diff: Source/platform/fonts/Font.cpp

Issue 1314843009: Add DocumentTiming metrics for "time to first text paint" (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.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: Source/platform/fonts/Font.cpp
diff --git a/Source/platform/fonts/Font.cpp b/Source/platform/fonts/Font.cpp
index aa087069dcd1202865b9e157dacb175a2be0e576..0a3eecbbe6b5efcfe22ec73c76549e01a59f361c 100644
--- a/Source/platform/fonts/Font.cpp
+++ b/Source/platform/fonts/Font.cpp
@@ -143,6 +143,9 @@ void Font::drawText(SkCanvas* canvas, const TextRunPaintInfo& runInfo,
if (shouldSkipDrawing())
return;
+ if (fontSelector())
drott 2015/09/16 07:26:20 If I am not mistaken, this keeps calling reportFir
Kunihiko Sakamoto 2015/09/17 08:36:10 That's right - I optimistically assumed the functi
+ fontSelector()->reportFirstNonBlankText(m_fontFallbackList->hasCustomFont());
+
if (runInfo.cachedTextBlob && runInfo.cachedTextBlob->get()) {
// we have a pre-cached blob -- happy joy!
drawTextBlob(canvas, paint, runInfo.cachedTextBlob->get(), point.data());
@@ -163,6 +166,9 @@ void Font::drawBidiText(SkCanvas* canvas, const TextRunPaintInfo& runInfo, const
if (shouldSkipDrawing() && customFontNotReadyAction == DoNotPaintIfFontNotReady)
return;
+ if (fontSelector())
drott 2015/09/16 07:26:20 Dito.
+ fontSelector()->reportFirstNonBlankText(m_fontFallbackList->hasCustomFont());
+
// sub-run painting is not supported for Bidi text.
const TextRun& run = runInfo.run;
ASSERT((runInfo.from == 0) && (runInfo.to == run.length()));

Powered by Google App Engine
This is Rietveld 408576698