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

Unified Diff: third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzFace.cpp

Issue 2088183002: Add UMA for hb_face_t instantiation type (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move from own enumeration to BooleanSuccess Created 4 years, 6 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
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzFace.cpp
diff --git a/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzFace.cpp b/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzFace.cpp
index 0dbb0a8b4f1384cfed17ba02bd14150f651fc3e9..a83e979194b5edc3bc6d67e75bf7172ce8452ecb 100644
--- a/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzFace.cpp
+++ b/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzFace.cpp
@@ -30,6 +30,7 @@
#include "platform/fonts/shaping/HarfBuzzFace.h"
+#include "platform/Histogram.h"
#include "platform/fonts/FontCache.h"
#include "platform/fonts/FontPlatformData.h"
#include "platform/fonts/SimpleFontData.h"
@@ -327,6 +328,9 @@ hb_face_t* HarfBuzzFace::createFace()
#else
hb_face_t* face = nullptr;
+ DEFINE_STATIC_LOCAL(BooleanHistogram,
+ zeroCopySuccessHistogram,
+ ("Blink.Fonts.HarfBuzzFaceZeroCopyAccess"));
SkTypeface* typeface = m_platformData->typeface();
int ttcIndex = 0;
SkStreamAsset* typefaceStream = typeface->openStream(&ttcIndex);
@@ -342,8 +346,12 @@ hb_face_t* HarfBuzzFace::createFace()
}
// Fallback to table copies if there is no in-memory access.
- if (!face)
+ if (!face) {
face = hb_face_create_for_tables(harfBuzzSkiaGetTable, m_platformData->typeface(), 0);
+ zeroCopySuccessHistogram.count(false);
+ } else {
+ zeroCopySuccessHistogram.count(true);
+ }
#endif
ASSERT(face);
return face;
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698