Bug 1533097 - restrict gfxWindowsPlatform::RecordStartupTelemetry to parent; r=jrmuizel
authorJune Wilde <jewilde@mozilla.com>
Thu, 14 Mar 2019 16:44:23 +0000
changeset 521948 24870321bdeb
parent 521947 d266414d9c66
child 521949 182f8f4a800c
push id10870
push usernbeleuzu@mozilla.com
push dateFri, 15 Mar 2019 20:00:07 +0000
treeherdermozilla-beta@c594aee5b7a4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1533097
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1533097 - restrict gfxWindowsPlatform::RecordStartupTelemetry to parent; r=jrmuizel Adds early exit if not originating in the parent process when recording display HDR capability. This helps to remove more win32k usage from content processes. Differential Revision: https://phabricator.services.mozilla.com/D23051
gfx/thebes/gfxWindowsPlatform.cpp
--- a/gfx/thebes/gfxWindowsPlatform.cpp
+++ b/gfx/thebes/gfxWindowsPlatform.cpp
@@ -1421,16 +1421,20 @@ void gfxWindowsPlatform::RecordContentDe
   if (!XRE_IsContentProcess()) {
     return;
   }
   Telemetry::Accumulate(Telemetry::GFX_CONTENT_FAILED_TO_ACQUIRE_DEVICE,
                         uint32_t(aDevice));
 }
 
 void gfxWindowsPlatform::RecordStartupTelemetry() {
+  if (!XRE_IsParentProcess()) {
+    return;
+  }
+
   DeviceManagerDx* dx = DeviceManagerDx::Get();
   nsTArray<DXGI_OUTPUT_DESC1> outputs = dx->EnumerateOutputs();
 
   uint32_t allSupportedColorSpaces = 0;
   for (auto& output : outputs) {
     uint32_t colorSpace = 1 << output.ColorSpace;
     allSupportedColorSpaces |= colorSpace;
   }