From 8207ea392deba81c9080c80611a42ac49343ad60 Mon Sep 17 00:00:00 2001 From: Brad Werth Date: Tue, 29 Nov 2022 02:31:19 +0000 Subject: [PATCH] Bug 1798067 Part 3: Emit telemetry for gfx.supports_hdr alongside other gfx telemetry. r=gfx-reviewers,nical Differential Revision: https://phabricator.services.mozilla.com/D161545 --- gfx/thebes/gfxPlatform.cpp | 4 ++++ toolkit/components/telemetry/Scalars.yaml | 15 +++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/gfx/thebes/gfxPlatform.cpp b/gfx/thebes/gfxPlatform.cpp index c33abcf2a554..76879a4d6dee 100644 --- a/gfx/thebes/gfxPlatform.cpp +++ b/gfx/thebes/gfxPlatform.cpp @@ -1109,6 +1109,10 @@ void gfxPlatform::ReportTelemetry() { adapterDriverDate); Telemetry::ScalarSet(Telemetry::ScalarID::GFX_HEADLESS, IsHeadless()); + + MOZ_ASSERT(gPlatform, "Need gPlatform to generate some telemetry."); + Telemetry::ScalarSet(Telemetry::ScalarID::GFX_SUPPORTS_HDR, + gPlatform->SupportsHDR()); } static bool IsFeatureSupported(long aFeature, bool aDefault) { diff --git a/toolkit/components/telemetry/Scalars.yaml b/toolkit/components/telemetry/Scalars.yaml index eac0c3813f85..6dc025a197ac 100644 --- a/toolkit/components/telemetry/Scalars.yaml +++ b/toolkit/components/telemetry/Scalars.yaml @@ -3920,6 +3920,21 @@ gfx: record_in_processes: - 'main' release_channel_collection: opt-out + supports_hdr: + bug_numbers: + - 1798067 + description: > + Does the hardware support accurate display of HDR content + expires: never + kind: boolean + notification_emails: + - gfx-telemetry-alerts@mozilla.com + - bwerth@mozilla.com + products: + - 'firefox' + record_in_processes: + - 'main' + release_channel_collection: opt-out # The following section contains the form autofill related scalars. formautofill: -- 2.11.4.GIT