Bug 1533097 - restrict gfxWindowsPlatform::RecordStartupTelemetry to parent; r=jrmuizel
authorJune Wilde <jewilde@mozilla.com>
Thu, 14 Mar 2019 16:44:23 +0000
changeset 464057 24870321bdeb499feac832ecbc165d7bd949b00b
parent 464056 d266414d9c66f4c3aa758b0879d1603e74282554
child 464058 182f8f4a800c0c96c234f8c7c312d3c9da2514b3
push id35707
push userrmaries@mozilla.com
push dateFri, 15 Mar 2019 03:42:43 +0000
treeherdermozilla-central@5ce27c44f79e [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;
   }