Bug 1331915 Add Telemetry probe to Graphite library usage
MozReview-Commit-ID: 1aU5ddQoLnV
--- a/gfx/thebes/gfxFont.cpp
+++ b/gfx/thebes/gfxFont.cpp
@@ -2707,16 +2707,17 @@ gfxFont::ShapeText(DrawTarget *aDra
bool ok = false;
// XXX Currently, we do all vertical shaping through harfbuzz.
// Vertical graphite support may be wanted as a future enhancement.
if (FontCanSupportGraphite() && !aVertical) {
if (gfxPlatform::GetPlatform()->UseGraphiteShaping()) {
if (!mGraphiteShaper) {
mGraphiteShaper = MakeUnique<gfxGraphiteShaper>(this);
+ Telemetry::ScalarAdd(Telemetry::ScalarID::BROWSER_USAGE_GRAPHITE, 1);
}
ok = mGraphiteShaper->ShapeText(aDrawTarget, aText, aOffset, aLength,
aScript, aVertical, aRounding,
aShapedText);
}
}
if (!ok) {
--- a/toolkit/components/telemetry/Scalars.yaml
+++ b/toolkit/components/telemetry/Scalars.yaml
@@ -196,16 +196,31 @@ browser.engagement.navigation:
kind: uint
keyed: true
notification_emails:
- bcolloran@mozilla.com
release_channel_collection: opt-out
record_in_processes:
- 'main'
+# The following section contains the browser usage scalars.
+browser.usage:
+ graphite:
+ bug_numbers:
+ - 1331915
+ description: >
+ The number of times a graphite2 font has been loaded.
+ expires: "60"
+ kind: uint
+ notification_emails:
+ - tom@mozilla.com
+ release_channel_collection: opt-in
+ record_in_processes:
+ - 'all'
+
# This section is for probes used to measure use of the Webextensions storage.sync API.
storage.sync.api.usage:
extensions_using:
bug_numbers:
- 1328974
description: >
The count of webextensions that have data stored in the chrome.storage.sync API.
This includes extensions that have not used the storage.sync API this session.