From ef06e673cd46852bdf4117ccd5497af4ce435c84 Mon Sep 17 00:00:00 2001 From: Michael Kaply Date: Tue, 1 Sep 2020 19:41:20 +0000 Subject: [PATCH] Bug 1645732 - Add telemetry for Linux window protocol. r=chutten,aosmond Differential Revision: https://phabricator.services.mozilla.com/D88696 --- toolkit/components/telemetry/Scalars.yaml | 16 ++++++++++++++++ widget/GfxInfoX11.cpp | 3 +++ 2 files changed, 19 insertions(+) diff --git a/toolkit/components/telemetry/Scalars.yaml b/toolkit/components/telemetry/Scalars.yaml index 3894a11f995c..6749773fe6d7 100644 --- a/toolkit/components/telemetry/Scalars.yaml +++ b/toolkit/components/telemetry/Scalars.yaml @@ -3621,6 +3621,22 @@ gfx: record_in_processes: - 'main' release_channel_collection: opt-out + linux_window_protocol: + bug_numbers: + - 1645732 + description: > + Windowing protocol on Linux. Can be Wayland, WaylandDRM, XWayland, or X11 + expires: never + kind: string + notification_emails: + - gfx-telemetry-alerts@mozilla.com + - aosmond@mozilla.com + - mkaply@mozilla.com + products: + - 'firefox' + record_in_processes: + - 'main' + release_channel_collection: opt-out # The following section contains the form autofill related scalars. formautofill: diff --git a/widget/GfxInfoX11.cpp b/widget/GfxInfoX11.cpp index 2dc18a82831d..25b32a2faf59 100644 --- a/widget/GfxInfoX11.cpp +++ b/widget/GfxInfoX11.cpp @@ -17,6 +17,7 @@ #include "prenv.h" #include "nsPrintfCString.h" #include "nsWhitespaceTokenizer.h" +#include "mozilla/Telemetry.h" #include "GfxInfoX11.h" @@ -706,6 +707,8 @@ GfxInfo::GetWindowProtocol(nsAString& aWindowProtocol) { } else { aWindowProtocol = GfxDriverInfo::GetWindowProtocol(WindowProtocol::X11); } + Telemetry::ScalarSet(Telemetry::ScalarID::GFX_LINUX_WINDOW_PROTOCOL, + aWindowProtocol); return NS_OK; }