Backed out changeset 0ae41aa8997b (bug 1594145) for build bustages on GfxInfo.cpp. CLOSED TREE
authorRazvan Maries <rmaries@mozilla.com>
Fri, 22 Nov 2019 14:52:04 +0200
changeset 503363 317361f21066c40e887df888be57e9ee0c171f15
parent 503362 dcd2e52739ab9b70b637d0b43ff85d17ada8c899
child 503364 b2cc8d30ec219c323cbf979efb713592fcde059f
push id101291
push userrmaries@mozilla.com
push dateFri, 22 Nov 2019 13:09:55 +0000
treeherderautoland@b2cc8d30ec21 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1594145
milestone72.0a1
backs out0ae41aa8997b2432ff017ec15dd65e737887a9da
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
Backed out changeset 0ae41aa8997b (bug 1594145) for build bustages on GfxInfo.cpp. CLOSED TREE
gfx/layers/LayersTypes.cpp
gfx/layers/LayersTypes.h
gfx/thebes/gfxPlatform.cpp
gfx/thebes/gfxPlatform.h
toolkit/components/telemetry/Scalars.yaml
toolkit/components/telemetry/geckoview/streaming/metrics.yaml
toolkit/xre/glxtest.cpp
widget/GfxInfoBase.cpp
widget/GfxInfoX11.cpp
widget/GfxInfoX11.h
widget/android/GfxInfo.cpp
widget/android/GfxInfo.h
widget/cocoa/GfxInfo.h
widget/cocoa/GfxInfo.mm
widget/nsIGfxInfo.idl
widget/uikit/GfxInfo.cpp
widget/uikit/GfxInfo.h
widget/windows/GfxInfo.cpp
widget/windows/GfxInfo.h
--- a/gfx/layers/LayersTypes.cpp
+++ b/gfx/layers/LayersTypes.cpp
@@ -4,36 +4,16 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "LayersTypes.h"
 
 namespace mozilla {
 namespace layers {
 
-const char* GetLayersBackendName(LayersBackend aBackend) {
-  switch (aBackend) {
-    case LayersBackend::LAYERS_NONE:
-      return "none";
-    case LayersBackend::LAYERS_OPENGL:
-      return "opengl";
-    case LayersBackend::LAYERS_D3D11:
-      return "d3d11";
-    case LayersBackend::LAYERS_CLIENT:
-      return "client";
-    case LayersBackend::LAYERS_WR:
-      return "webrender";
-    case LayersBackend::LAYERS_BASIC:
-      return "basic";
-    default:
-      MOZ_ASSERT_UNREACHABLE("unknown layers backend");
-      return "unknown";
-  }
-}
-
 EventRegions::EventRegions(const nsIntRegion& aHitRegion,
                            const nsIntRegion& aMaybeHitRegion,
                            const nsIntRegion& aDispatchToContentRegion,
                            const nsIntRegion& aNoActionRegion,
                            const nsIntRegion& aHorizontalPanRegion,
                            const nsIntRegion& aVerticalPanRegion,
                            bool aDTCRequiresTargetConfirmation) {
   mHitRegion = aHitRegion;
--- a/gfx/layers/LayersTypes.h
+++ b/gfx/layers/LayersTypes.h
@@ -150,18 +150,16 @@ enum class LayersBackend : int8_t {
   LAYERS_BASIC,
   LAYERS_OPENGL,
   LAYERS_D3D11,
   LAYERS_CLIENT,
   LAYERS_WR,
   LAYERS_LAST
 };
 
-const char* GetLayersBackendName(LayersBackend aBackend);
-
 enum class TextureType : int8_t {
   Unknown = 0,
   D3D11,
   DIB,
   X11,
   MacIOSurface,
   AndroidNativeWindow,
   WaylandDMABUF,
--- a/gfx/thebes/gfxPlatform.cpp
+++ b/gfx/thebes/gfxPlatform.cpp
@@ -1101,92 +1101,22 @@ void gfxPlatform::Init() {
     if (!gPlatform->HasVariationFontSupport()) {
       // Ensure variation fonts are disabled and the pref is locked.
       Preferences::SetBool(FONT_VARIATIONS_PREF, false, PrefValueKind::Default);
       Preferences::SetBool(FONT_VARIATIONS_PREF, false);
       Preferences::Lock(FONT_VARIATIONS_PREF);
     }
   }
 
-  if (XRE_IsParentProcess()) {
-    ReportTelemetry();
-  }
-
   nsCOMPtr<nsIObserverService> obs = services::GetObserverService();
   if (obs) {
     obs->NotifyObservers(nullptr, "gfx-features-ready", nullptr);
   }
 }
 
-void gfxPlatform::ReportTelemetry() {
-  MOZ_RELEASE_ASSERT(XRE_IsParentProcess(),
-                     "GFX: Only allowed to be called from parent process.");
-
-  nsCOMPtr<nsIGfxInfo> gfxInfo = services::GetGfxInfo();
-  nsTArray<uint32_t> displayWidths;
-  nsTArray<uint32_t> displayHeights;
-  gfxInfo->GetDisplayWidth(displayWidths);
-  gfxInfo->GetDisplayHeight(displayHeights);
-
-  uint32_t displayCount = displayWidths.Length();
-  uint32_t displayWidth = displayWidths.Length() > 0 ? displayWidths[0] : 0;
-  uint32_t displayHeight = displayHeights.Length() > 0 ? displayHeights[0] : 0;
-  Telemetry::ScalarSet(Telemetry::ScalarID::GFX_DISPLAY_COUNT, displayCount);
-  Telemetry::ScalarSet(Telemetry::ScalarID::GFX_DISPLAY_PRIMARY_HEIGHT,
-                       displayHeight);
-  Telemetry::ScalarSet(Telemetry::ScalarID::GFX_DISPLAY_PRIMARY_WIDTH,
-                       displayWidth);
-
-  nsString adapterDesc;
-  gfxInfo->GetAdapterDescription(adapterDesc);
-  Telemetry::ScalarSet(Telemetry::ScalarID::GFX_ADAPTER_DESCRIPTION,
-                       adapterDesc);
-
-  nsString adapterVendorId;
-  gfxInfo->GetAdapterVendorID(adapterVendorId);
-  Telemetry::ScalarSet(Telemetry::ScalarID::GFX_ADAPTER_VENDOR_ID,
-                       adapterVendorId);
-
-  nsString adapterDeviceId;
-  gfxInfo->GetAdapterDeviceID(adapterDeviceId);
-  Telemetry::ScalarSet(Telemetry::ScalarID::GFX_ADAPTER_DEVICE_ID,
-                       adapterDeviceId);
-
-  nsString adapterSubsystemId;
-  gfxInfo->GetAdapterSubsysID(adapterSubsystemId);
-  Telemetry::ScalarSet(Telemetry::ScalarID::GFX_ADAPTER_SUBSYSTEM_ID,
-                       adapterSubsystemId);
-
-  uint32_t adapterRam = 0;
-  gfxInfo->GetAdapterRAM(&adapterRam);
-  Telemetry::ScalarSet(Telemetry::ScalarID::GFX_ADAPTER_RAM, adapterRam);
-
-  nsString adapterDriver;
-  gfxInfo->GetAdapterDriver(adapterDriver);
-  Telemetry::ScalarSet(Telemetry::ScalarID::GFX_ADAPTER_DRIVER_FILES,
-                       adapterDriver);
-
-  nsString adapterDriverVendor;
-  gfxInfo->GetAdapterDriverVendor(adapterDriverVendor);
-  Telemetry::ScalarSet(Telemetry::ScalarID::GFX_ADAPTER_DRIVER_VENDOR,
-                       adapterDriverVendor);
-
-  nsString adapterDriverVersion;
-  gfxInfo->GetAdapterDriverVersion(adapterDriverVersion);
-  Telemetry::ScalarSet(Telemetry::ScalarID::GFX_ADAPTER_DRIVER_VERSION,
-                       adapterDriverVersion);
-
-  nsString adapterDriverDate;
-  gfxInfo->GetAdapterDriverDate(adapterDriverDate);
-  Telemetry::ScalarSet(Telemetry::ScalarID::GFX_ADAPTER_DRIVER_DATE,
-                       adapterDriverDate);
-
-  Telemetry::ScalarSet(Telemetry::ScalarID::GFX_HEADLESS, IsHeadless());
-}
-
 static bool IsFeatureSupported(long aFeature, bool aDefault) {
   nsCOMPtr<nsIGfxInfo> gfxInfo = services::GetGfxInfo();
   nsCString blockId;
   int32_t status;
   if (!NS_SUCCEEDED(gfxInfo->GetFeatureStatus(aFeature, blockId, &status))) {
     return aDefault;
   }
   return status == nsIGfxInfo::FEATURE_STATUS_OK;
@@ -3661,22 +3591,16 @@ void gfxPlatform::NotifyCompositorCreate
   if (mCompositorBackend != LayersBackend::LAYERS_NONE) {
     gfxCriticalNote << "Compositors might be mixed (" << int(mCompositorBackend)
                     << "," << int(aBackend) << ")";
   }
 
   // Set the backend before we notify so it's available immediately.
   mCompositorBackend = aBackend;
 
-  if (XRE_IsParentProcess()) {
-    Telemetry::ScalarSet(
-        Telemetry::ScalarID::GFX_COMPOSITOR,
-        NS_ConvertUTF8toUTF16(GetLayersBackendName(mCompositorBackend)));
-  }
-
   // Notify that we created a compositor, so telemetry can update.
   NS_DispatchToMainThread(
       NS_NewRunnableFunction("gfxPlatform::NotifyCompositorCreated", [] {
         if (nsCOMPtr<nsIObserverService> obsvc =
                 services::GetObserverService()) {
           obsvc->NotifyObservers(nullptr, "compositor:created", nullptr);
         }
       }));
--- a/gfx/thebes/gfxPlatform.h
+++ b/gfx/thebes/gfxPlatform.h
@@ -893,19 +893,16 @@ class gfxPlatform : public mozilla::laye
    */
   void PopulateScreenInfo();
 
   void InitCompositorAccelerationPrefs();
   void InitGPUProcessPrefs();
   virtual void InitPlatformGPUProcessPrefs() {}
   void InitOMTPConfig();
 
-  // Gather telemetry data about the Gfx Platform and send it
-  static void ReportTelemetry();
-
   static bool IsDXInterop2Blocked();
   static bool IsDXNV12Blocked();
   static bool IsDXP010Blocked();
   static bool IsDXP016Blocked();
 
   RefPtr<gfxASurface> mScreenReferenceSurface;
   nsCOMPtr<nsIObserver> mSRGBOverrideObserver;
   RefPtr<mozilla::layers::MemoryPressureObserver> mMemoryPressureObserver;
--- a/toolkit/components/telemetry/Scalars.yaml
+++ b/toolkit/components/telemetry/Scalars.yaml
@@ -2800,231 +2800,16 @@ gfx.hdr:
       - rhunt@mozilla.com
     products:
       - 'firefox'
       - 'fennec'
       - 'geckoview'
     record_in_processes:
       - 'main'
 
-
-gfx.display:
-  count:
-    bug_numbers:
-      - 1594145
-    description: >
-      Number of displays connected to the device
-    expires: never
-    kind: uint
-    notification_emails:
-      - gfx-telemetry-alerts@mozilla.com
-      - ktaeleman@mozilla.com
-    products:
-      - 'geckoview_streaming'
-    record_in_processes:
-      - 'main'
-    release_channel_collection: opt-out
-  primary_width:
-    bug_numbers:
-      - 1594145
-    description: >
-      Width of the primary display, takes device rotation into account.
-    expires: never
-    kind: uint
-    notification_emails:
-      - gfx-telemetry-alerts@mozilla.com
-      - ktaeleman@mozilla.com
-    products:
-      - 'geckoview_streaming'
-    record_in_processes:
-      - 'main'
-    release_channel_collection: opt-out
-  primary_height:
-    bug_numbers:
-      - 1594145
-    description: >
-      Height of the primary display, takes device rotation into account.
-    expires: never
-    kind: uint
-    notification_emails:
-      - gfx-telemetry-alerts@mozilla.com
-      - ktaeleman@mozilla.com
-    products:
-      - 'geckoview_streaming'
-    record_in_processes:
-      - 'main'
-    release_channel_collection: opt-out
-gfx.adapter:
-  description:
-    bug_numbers:
-      - 1594145
-    description: >
-      Long form description of the Graphics adapter
-    expires: never
-    kind: string
-    notification_emails:
-      - gfx-telemetry-alerts@mozilla.com
-      - ktaeleman@mozilla.com
-    products:
-      - 'geckoview_streaming'
-    record_in_processes:
-      - 'main'
-    release_channel_collection: opt-out
-  vendor_id:
-    bug_numbers:
-      - 1594145
-    description: >
-      Graphics adapter vendor identification
-    expires: never
-    kind: string
-    notification_emails:
-      - gfx-telemetry-alerts@mozilla.com
-      - ktaeleman@mozilla.com
-    products:
-      - 'geckoview_streaming'
-    record_in_processes:
-      - 'main'
-    release_channel_collection: opt-out
-  device_id:
-    bug_numbers:
-      - 1594145
-    description: >
-      Graphics adapter device identification
-    expires: never
-    kind: string
-    notification_emails:
-      - gfx-telemetry-alerts@mozilla.com
-      - ktaeleman@mozilla.com
-    products:
-      - 'geckoview_streaming'
-    record_in_processes:
-      - 'main'
-    release_channel_collection: opt-out
-  subsystem_id:
-    bug_numbers:
-      - 1594145
-    description: >
-      Graphics adapter subsystem identification
-    expires: never
-    kind: string
-    notification_emails:
-      - gfx-telemetry-alerts@mozilla.com
-      - ktaeleman@mozilla.com
-    products:
-      - 'geckoview_streaming'
-    record_in_processes:
-      - 'main'
-    release_channel_collection: opt-out
-  ram:
-    bug_numbers:
-      - 1594145
-    description: >
-      Graphics adapter dedicated memory
-    expires: never
-    kind: uint
-    notification_emails:
-      - gfx-telemetry-alerts@mozilla.com
-      - ktaeleman@mozilla.com
-    products:
-      - 'geckoview_streaming'
-    record_in_processes:
-      - 'main'
-    release_channel_collection: opt-out
-  driver_files:
-    bug_numbers:
-      - 1594145
-    description: >
-      List of graphics adapter driver files
-    expires: never
-    kind: string
-    notification_emails:
-      - gfx-telemetry-alerts@mozilla.com
-      - ktaeleman@mozilla.com
-    products:
-      - 'geckoview_streaming'
-    record_in_processes:
-      - 'main'
-    release_channel_collection: opt-out
-  driver_vendor:
-    bug_numbers:
-      - 1594145
-    description: >
-      Graphics adapter driver vendor identification
-    expires: never
-    kind: string
-    notification_emails:
-      - gfx-telemetry-alerts@mozilla.com
-      - ktaeleman@mozilla.com
-    products:
-      - 'geckoview_streaming'
-    record_in_processes:
-      - 'main'
-    release_channel_collection: opt-out
-  driver_version:
-    bug_numbers:
-      - 1594145
-    description: >
-      Graphics adapter driver version
-    expires: never
-    kind: string
-    notification_emails:
-      - gfx-telemetry-alerts@mozilla.com
-      - ktaeleman@mozilla.com
-    products:
-      - 'geckoview_streaming'
-    record_in_processes:
-      - 'main'
-    release_channel_collection: opt-out
-  driver_date:
-    bug_numbers:
-      - 1594145
-    description: >
-      Graphics adapter driver date
-    expires: never
-    kind: string
-    notification_emails:
-      - gfx-telemetry-alerts@mozilla.com
-      - ktaeleman@mozilla.com
-    products:
-      - 'geckoview_streaming'
-    record_in_processes:
-      - 'main'
-    release_channel_collection: opt-out
-gfx:
-  compositor:
-    bug_numbers:
-      - 1594145
-    description: >
-      Name of the graphics compositor in use. possible values are "opengl, d3d11, client, webrender or basic"
-    expires: never
-    kind: string
-    notification_emails:
-      - gfx-telemetry-alerts@mozilla.com
-      - ktaeleman@mozilla.com
-    products:
-      - 'geckoview_streaming'
-    record_in_processes:
-      - 'main'
-    release_channel_collection: opt-out
-  headless:
-    bug_numbers:
-      - 1594145
-    description: >
-      Boolean indicated whether graphics is running in headless (no display) mode
-    expires: never
-    kind: boolean
-    notification_emails:
-      - gfx-telemetry-alerts@mozilla.com
-      - ktaeleman@mozilla.com
-    products:
-      - 'geckoview_streaming'
-    record_in_processes:
-      - 'main'
-    release_channel_collection: opt-out
-
 # The following section contains the form autofill related scalars.
 formautofill:
   availability:
     bug_numbers:
       - 1386959
     description: A boolean sent once per session to represent whether the formautofill is available in the build
     expires: never
     kind: boolean
--- a/toolkit/components/telemetry/geckoview/streaming/metrics.yaml
+++ b/toolkit/components/telemetry/geckoview/streaming/metrics.yaml
@@ -387,213 +387,8 @@ gfx.webrender:
       - https://bugzilla.mozilla.org/show_bug.cgi?id=1470901
       - https://bugzilla.mozilla.org/show_bug.cgi?id=1584109
     data_reviews:
       - https://bugzilla.mozilla.org/show_bug.cgi?id=1584109#c1
     notification_emails:
       - gfx-telemetry-alerts@mozilla.com
       - kgupta@mozilla.com
     expires: never
-
-gfx.display:
-  count:
-    description: >
-      Amount of displays connected to the device
-    type: quantity
-    unit: Display count
-    lifetime: application
-    gecko_datapoint: gfx.display.count
-    bugs:
-      - 1594145
-    data_reviews:
-      - https://bugzilla.mozilla.org/show_bug.cgi?id=1594145#c4
-    notification_emails:
-      - gfx-telemetry-alerts@mozilla.com
-      - ktaeleman@mozilla.com
-    expires: never
-  primary_width:
-    description: >
-      Width of the primary display, takes device rotation into account.
-    type: quantity
-    unit: Pixels
-    lifetime: application
-    gecko_datapoint: gfx.display.primary_width
-    bugs:
-      - 1594145
-    data_reviews:
-      - https://bugzilla.mozilla.org/show_bug.cgi?id=1594145#c4
-    notification_emails:
-      - gfx-telemetry-alerts@mozilla.com
-      - ktaeleman@mozilla.com
-    expires: never
-  primary_height:
-    description: >
-      Height of the primary display, takes device rotation into account.
-    type: quantity
-    unit: Pixels
-    lifetime: application
-    gecko_datapoint: gfx.display.primary_height
-    bugs:
-      - 1594145
-    data_reviews:
-      - https://bugzilla.mozilla.org/show_bug.cgi?id=1594145#c4
-    notification_emails:
-      - gfx-telemetry-alerts@mozilla.com
-      - ktaeleman@mozilla.com
-    expires: never
-gfx.adapter.primary:
-  description:
-    description: >
-      Long form description of the Graphics adapter
-    type: string
-    lifetime: application
-    gecko_datapoint: gfx.adapter.description
-    bugs:
-      - 1594145
-    data_reviews:
-      - https://bugzilla.mozilla.org/show_bug.cgi?id=1594145#c4
-    notification_emails:
-      - gfx-telemetry-alerts@mozilla.com
-      - ktaeleman@mozilla.com
-    expires: never
-  vendor_id:
-    description: >
-      Graphics adapter vendor identification
-    type: string
-    lifetime: application
-    gecko_datapoint: gfx.adapter.vendor_id
-    bugs:
-      - 1594145
-    data_reviews:
-      - https://bugzilla.mozilla.org/show_bug.cgi?id=1594145#c4
-    notification_emails:
-      - gfx-telemetry-alerts@mozilla.com
-      - ktaeleman@mozilla.com
-    expires: never
-  device_id:
-    description: >
-      Graphics adapter device identification
-    type: string
-    lifetime: application
-    gecko_datapoint: gfx.adapter.device_id
-    bugs:
-      - 1594145
-    data_reviews:
-      - https://bugzilla.mozilla.org/show_bug.cgi?id=1594145#c4
-    notification_emails:
-      - gfx-telemetry-alerts@mozilla.com
-      - ktaeleman@mozilla.com
-    expires: never
-  subsystem_id:
-    description: >
-      Graphics adapter subsystem identification
-    type: string
-    lifetime: application
-    gecko_datapoint: gfx.adapter.subsystem_id
-    bugs:
-      - 1594145
-    data_reviews:
-      - https://bugzilla.mozilla.org/show_bug.cgi?id=1594145#c4
-    notification_emails:
-      - gfx-telemetry-alerts@mozilla.com
-      - ktaeleman@mozilla.com
-    expires: never
-  ram:
-    description: >
-      Graphics adapter dedicated memory
-    type: quantity
-    unit: Megabytes
-    lifetime: application
-    gecko_datapoint: gfx.adapter.ram
-    bugs:
-      - 1594145
-    data_reviews:
-      - https://bugzilla.mozilla.org/show_bug.cgi?id=1594145#c4
-    notification_emails:
-      - gfx-telemetry-alerts@mozilla.com
-      - ktaeleman@mozilla.com
-    expires: never
-  driver_files:
-    description: >
-      List of graphics adapter driver files
-    type: string
-    lifetime: application
-    gecko_datapoint: gfx.adapter.driver_files
-    bugs:
-      - 1594145
-    data_reviews:
-      - https://bugzilla.mozilla.org/show_bug.cgi?id=1594145#c4
-    notification_emails:
-      - gfx-telemetry-alerts@mozilla.com
-      - ktaeleman@mozilla.com
-    expires: never
-  driver_vendor:
-    description: >
-      Graphics adapter driver vendor identification
-    type: string
-    lifetime: application
-    gecko_datapoint: gfx.adapter.driver_vendor
-    bugs:
-      - 1594145
-    data_reviews:
-      - https://bugzilla.mozilla.org/show_bug.cgi?id=1594145#c4
-    notification_emails:
-      - gfx-telemetry-alerts@mozilla.com
-      - ktaeleman@mozilla.com
-    expires: never
-  driver_version:
-    description: >
-      Graphics adapter driver version
-    type: string
-    lifetime: application
-    gecko_datapoint: gfx.adapter.driver_version
-    bugs:
-      - 1594145
-    data_reviews:
-      - https://bugzilla.mozilla.org/show_bug.cgi?id=1594145#c4
-    notification_emails:
-      - gfx-telemetry-alerts@mozilla.com
-      - ktaeleman@mozilla.com
-    expires: never
-  driver_date:
-    description: >
-      Graphics adapter driver date
-    type: string
-    lifetime: application
-    gecko_datapoint: gfx.adapter.driver_date
-    bugs:
-      - 1594145
-    data_reviews:
-      - https://bugzilla.mozilla.org/show_bug.cgi?id=1594145#c4
-    notification_emails:
-      - gfx-telemetry-alerts@mozilla.com
-      - ktaeleman@mozilla.com
-    expires: never
-
-gfx.status:
-  compositor:
-    description: >
-      Name of the graphics compositor in use. possible values are "opengl, d3d11, client, webrender or basic"
-    type: string
-    lifetime: application
-    gecko_datapoint: gfx.compositor
-    bugs:
-      - 1594145
-    data_reviews:
-      - https://bugzilla.mozilla.org/show_bug.cgi?id=1594145#c4
-    notification_emails:
-      - gfx-telemetry-alerts@mozilla.com
-      - ktaeleman@mozilla.com
-    expires: never
-  headless:
-    description: >
-      Boolean indicated whether graphics is running in headless (no display) mode
-    type: boolean
-    lifetime: application
-    gecko_datapoint: gfx.headless
-    bugs:
-      - 1594145
-    data_reviews:
-      - https://bugzilla.mozilla.org/show_bug.cgi?id=1594145#c4
-    notification_emails:
-      - gfx-telemetry-alerts@mozilla.com
-      - ktaeleman@mozilla.com
-    expires: never
--- a/toolkit/xre/glxtest.cpp
+++ b/toolkit/xre/glxtest.cpp
@@ -361,18 +361,18 @@ void glxtest() {
     if (length >= bufsize)
       fatal_error("Screen Info strings length too large for buffer size");
     for (int idx = 0; idx < screenCount; idx++) {
       Screen* scrn = ScreenOfDisplay(dpy, idx);
       int current_height = scrn->height;
       int current_width = scrn->width;
 
       length +=
-          snprintf(buf + length, bufsize - length, "%dx%d:%d%s", current_width,
-                   current_height, idx == defaultScreen ? 1 : 0,
+          snprintf(buf + length, bufsize - length, "%dx%d%s%s", current_width,
+                   current_height, idx == defaultScreen ? " default" : "",
                    idx == screenCount - 1 ? ";\n" : ";");
       if (length >= bufsize)
         fatal_error("Screen Info strings length too large for buffer size");
     }
   }
 
   ///// Clean up. Indeed, the parent process might fail to kill us (e.g. if it
   ///// doesn't need to check GL info) so we might be staying alive for longer
--- a/widget/GfxInfoBase.cpp
+++ b/widget/GfxInfoBase.cpp
@@ -1240,16 +1240,36 @@ GfxInfoBase::GetMonitors(JSContext* aCx,
   if (NS_FAILED(rv)) {
     return rv;
   }
 
   aResult.setObject(*array);
   return NS_OK;
 }
 
+static const char* GetLayersBackendName(layers::LayersBackend aBackend) {
+  switch (aBackend) {
+    case layers::LayersBackend::LAYERS_NONE:
+      return "none";
+    case layers::LayersBackend::LAYERS_OPENGL:
+      return "opengl";
+    case layers::LayersBackend::LAYERS_D3D11:
+      return "d3d11";
+    case layers::LayersBackend::LAYERS_CLIENT:
+      return "client";
+    case layers::LayersBackend::LAYERS_WR:
+      return "webrender";
+    case layers::LayersBackend::LAYERS_BASIC:
+      return "basic";
+    default:
+      MOZ_ASSERT_UNREACHABLE("unknown layers backend");
+      return "unknown";
+  }
+}
+
 static inline bool SetJSPropertyString(JSContext* aCx,
                                        JS::Handle<JSObject*> aObj,
                                        const char* aProp, const char* aString) {
   JS::Rooted<JSString*> str(aCx, JS_NewStringCopyZ(aCx, aString));
   if (!str) {
     return false;
   }
 
@@ -1274,17 +1294,17 @@ nsresult GfxInfoBase::GetFeatures(JSCont
     return NS_ERROR_OUT_OF_MEMORY;
   }
   aOut.setObject(*obj);
 
   layers::LayersBackend backend =
       gfxPlatform::Initialized()
           ? gfxPlatform::GetPlatform()->GetCompositorBackend()
           : layers::LayersBackend::LAYERS_NONE;
-  const char* backendName = layers::GetLayersBackendName(backend);
+  const char* backendName = GetLayersBackendName(backend);
   SetJSPropertyString(aCx, obj, "compositor", backendName);
 
   // If graphics isn't initialized yet, just stop now.
   if (!gfxPlatform::Initialized()) {
     return NS_OK;
   }
 
   DescribeFeatures(aCx, obj);
--- a/widget/GfxInfoX11.cpp
+++ b/widget/GfxInfoX11.cpp
@@ -127,20 +127,18 @@ void GfxInfo::GetData() {
 
   // Available if GLX_MESA_query_renderer is supported.
   nsCString mesaVendor;
   nsCString mesaDevice;
   nsCString mesaAccelerated;
   // Available if using a DRI-based libGL stack.
   nsCString driDriver;
   nsCString screenInfo;
-  nsCString adapterRam;
 
   nsCString* stringToFill = nullptr;
-
   char* bufptr = buf;
   if (!error) {
     while (true) {
       char* line = NS_strtok("\n", &bufptr);
       if (!line) break;
       if (stringToFill) {
         stringToFill->Assign(line);
         stringToFill = nullptr;
@@ -154,17 +152,17 @@ void GfxInfo::GetData() {
         stringToFill = &textureFromPixmap;
       else if (!strcmp(line, "MESA_VENDOR_ID"))
         stringToFill = &mesaVendor;
       else if (!strcmp(line, "MESA_DEVICE_ID"))
         stringToFill = &mesaDevice;
       else if (!strcmp(line, "MESA_ACCELERATED"))
         stringToFill = &mesaAccelerated;
       else if (!strcmp(line, "MESA_VRAM"))
-        stringToFill = &adapterRam;
+        stringToFill = &mAdapterRAM;
       else if (!strcmp(line, "DRI_DRIVER"))
         stringToFill = &driDriver;
       else if (!strcmp(line, "SCREEN_INFO"))
         stringToFill = &screenInfo;
     }
   }
 
   if (!strcmp(textureFromPixmap.get(), "TRUE")) mHasTextureFromPixmap = true;
@@ -294,34 +292,26 @@ void GfxInfo::GetData() {
   } else {
     NS_WARNING("Failed to detect GL vendor!");
   }
 
   if (!screenInfo.IsEmpty()) {
     PRInt32 start = 0;
     PRInt32 loc = screenInfo.Find(";", PR_FALSE, start);
     while (loc != kNotFound) {
-      int isDefault = 0;
       nsCString line(screenInfo.get() + start, loc - start);
-      ScreenInfo info;
-      if (sscanf(line.get(), "%ux%u:%u", &info.mWidth, &info.mHeight,
-                 &isDefault) == 3) {
-        info.mIsDefault = isDefault != 0;
-        mScreenInfo.AppendElement(info);
-      }
+      nsString value;
+      CopyASCIItoUTF16(line, value);
 
+      mScreenInfo.AppendElement(value);
       start = loc + 1;
       loc = screenInfo.Find(";", PR_FALSE, start);
     }
   }
 
-  if (!adapterRam.IsEmpty()) {
-    mAdapterRAM = (uint32_t)atoi(adapterRam.get());
-  }
-
   // Fallback to GL_VENDOR and GL_RENDERER.
   if (mVendorId.IsEmpty()) {
     mVendorId.Assign(glVendor.get());
   }
   if (mDeviceId.IsEmpty()) {
     mDeviceId.Assign(glRenderer.get());
   }
 
@@ -517,24 +507,24 @@ GfxInfo::GetAdapterDescription(nsAString
 }
 
 NS_IMETHODIMP
 GfxInfo::GetAdapterDescription2(nsAString& aAdapterDescription) {
   return NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP
-GfxInfo::GetAdapterRAM(uint32_t* aAdapterRAM) {
+GfxInfo::GetAdapterRAM(nsAString& aAdapterRAM) {
   GetData();
-  *aAdapterRAM = mAdapterRAM;
+  CopyUTF8toUTF16(mAdapterRAM, aAdapterRAM);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-GfxInfo::GetAdapterRAM2(uint32_t* aAdapterRAM) { return NS_ERROR_FAILURE; }
+GfxInfo::GetAdapterRAM2(nsAString& aAdapterRAM) { return NS_ERROR_FAILURE; }
 
 NS_IMETHODIMP
 GfxInfo::GetAdapterDriver(nsAString& aAdapterDriver) {
   aAdapterDriver.Truncate();
   return NS_OK;
 }
 
 NS_IMETHODIMP
@@ -609,41 +599,22 @@ GfxInfo::GetAdapterSubsysID(nsAString& a
 NS_IMETHODIMP
 GfxInfo::GetAdapterSubsysID2(nsAString& aAdapterSubsysID) {
   return NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP
 GfxInfo::GetDisplayInfo(nsTArray<nsString>& aDisplayInfo) {
   GetData();
-
-  for (auto screenInfo : mScreenInfo) {
-    nsString infoString;
-    infoString.AppendPrintf("%dx%d %s", screenInfo.mWidth, screenInfo.mHeight,
-                            screenInfo.mIsDefault ? "default" : "");
-    aDisplayInfo.AppendElement(infoString);
-  }
-
-  return aDisplayInfo.IsEmpty() ? NS_ERROR_FAILURE : NS_OK;
-}
+  if (!mScreenInfo.IsEmpty()) {
+    aDisplayInfo = mScreenInfo;
 
-NS_IMETHODIMP
-GfxInfo::GetDisplayWidth(nsTArray<uint32_t>& aDisplayWidth) {
-  for (auto screenInfo : mScreenInfo) {
-    aDisplayWidth.AppendElement((uint32_t)screenInfo.mWidth);
+    return NS_OK;
   }
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-GfxInfo::GetDisplayHeight(nsTArray<uint32_t>& aDisplayHeight) {
-  for (auto screenInfo : mScreenInfo) {
-    aDisplayHeight.AppendElement((uint32_t)screenInfo.mHeight);
-  }
-  return NS_OK;
+  return NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP
 GfxInfo::GetIsGPU2Active(bool* aIsGPU2Active) { return NS_ERROR_FAILURE; }
 
 #ifdef DEBUG
 
 // Implement nsIGfxInfoDebug
--- a/widget/GfxInfoX11.h
+++ b/widget/GfxInfoX11.h
@@ -23,34 +23,32 @@ class GfxInfo final : public GfxInfoBase
   NS_IMETHOD GetDWriteVersion(nsAString& aDwriteVersion) override;
   NS_IMETHOD GetCleartypeParameters(nsAString& aCleartypeParams) override;
   NS_IMETHOD GetWindowProtocol(nsAString& aWindowProtocol) override;
   NS_IMETHOD GetAdapterDescription(nsAString& aAdapterDescription) override;
   NS_IMETHOD GetAdapterDriver(nsAString& aAdapterDriver) override;
   NS_IMETHOD GetAdapterVendorID(nsAString& aAdapterVendorID) override;
   NS_IMETHOD GetAdapterDeviceID(nsAString& aAdapterDeviceID) override;
   NS_IMETHOD GetAdapterSubsysID(nsAString& aAdapterSubsysID) override;
-  NS_IMETHOD GetAdapterRAM(uint32_t* aAdapterRAM) override;
+  NS_IMETHOD GetAdapterRAM(nsAString& aAdapterRAM) override;
   NS_IMETHOD GetAdapterDriverVendor(nsAString& aAdapterDriverVendor) override;
   NS_IMETHOD GetAdapterDriverVersion(nsAString& aAdapterDriverVersion) override;
   NS_IMETHOD GetAdapterDriverDate(nsAString& aAdapterDriverDate) override;
   NS_IMETHOD GetAdapterDescription2(nsAString& aAdapterDescription) override;
   NS_IMETHOD GetAdapterDriver2(nsAString& aAdapterDriver) override;
   NS_IMETHOD GetAdapterVendorID2(nsAString& aAdapterVendorID) override;
   NS_IMETHOD GetAdapterDeviceID2(nsAString& aAdapterDeviceID) override;
   NS_IMETHOD GetAdapterSubsysID2(nsAString& aAdapterSubsysID) override;
-  NS_IMETHOD GetAdapterRAM2(uint32_t* aAdapterRAM) override;
+  NS_IMETHOD GetAdapterRAM2(nsAString& aAdapterRAM) override;
   NS_IMETHOD GetAdapterDriverVendor2(nsAString& aAdapterDriverVendor) override;
   NS_IMETHOD GetAdapterDriverVersion2(
       nsAString& aAdapterDriverVersion) override;
   NS_IMETHOD GetAdapterDriverDate2(nsAString& aAdapterDriverDate) override;
   NS_IMETHOD GetIsGPU2Active(bool* aIsGPU2Active) override;
   NS_IMETHOD GetDisplayInfo(nsTArray<nsString>& aDisplayInfo) override;
-  NS_IMETHOD GetDisplayWidth(nsTArray<uint32_t>& aDisplayWidth) override;
-  NS_IMETHOD GetDisplayHeight(nsTArray<uint32_t>& aDisplayHeight) override;
   using GfxInfoBase::GetFeatureStatus;
   using GfxInfoBase::GetFeatureSuggestedDriverVersion;
 
   virtual nsresult Init() override;
 
   NS_IMETHOD_(void) GetData() override;
 
 #ifdef DEBUG
@@ -71,27 +69,20 @@ class GfxInfo final : public GfxInfoBase
                                      const nsAString& aDriverVendor) override;
 
  private:
   nsCString mVendorId;
   nsCString mDeviceId;
   nsCString mDriverVendor;
   nsCString mDriverVersion;
   nsCString mAdapterDescription;
-  uint32_t mAdapterRAM;
+  nsCString mAdapterRAM;
   nsCString mOS;
   nsCString mOSRelease;
-
-  struct ScreenInfo {
-    uint32_t mWidth;
-    uint32_t mHeight;
-    bool mIsDefault;
-  };
-
-  nsTArray<ScreenInfo> mScreenInfo;
+  nsTArray<nsString> mScreenInfo;
   bool mHasTextureFromPixmap;
   unsigned int mGLMajorVersion, mGLMinorVersion;
   bool mIsMesa;
   bool mIsAccelerated;
   bool mIsWayland;
   bool mIsWaylandDRM;
 
   void AddCrashReportAnnotations();
--- a/widget/android/GfxInfo.cpp
+++ b/widget/android/GfxInfo.cpp
@@ -221,24 +221,24 @@ GfxInfo::GetAdapterDescription(nsAString
 
 NS_IMETHODIMP
 GfxInfo::GetAdapterDescription2(nsAString& aAdapterDescription) {
   EnsureInitialized();
   return NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP
-GfxInfo::GetAdapterRAM(uint32_t* aAdapterRAM) {
+GfxInfo::GetAdapterRAM(nsAString& aAdapterRAM) {
   EnsureInitialized();
-  *aAdapterRAM = 0;
+  aAdapterRAM.Truncate();
   return NS_OK;
 }
 
 NS_IMETHODIMP
-GfxInfo::GetAdapterRAM2(uint32_t* aAdapterRAM) {
+GfxInfo::GetAdapterRAM2(nsAString& aAdapterRAM) {
   EnsureInitialized();
   return NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP
 GfxInfo::GetAdapterDriver(nsAString& aAdapterDriver) {
   EnsureInitialized();
   aAdapterDriver.Truncate();
@@ -340,28 +340,16 @@ GfxInfo::GetDisplayInfo(nsTArray<nsStrin
   nsString displayInfo;
   displayInfo.AppendPrintf("%dx%d",
                            (int32_t)mScreenInfo.mScreenDimensions.width,
                            (int32_t)mScreenInfo.mScreenDimensions.height);
   aDisplayInfo.AppendElement(displayInfo);
   return NS_OK;
 }
 
-NS_IMETHODIMP
-GfxInfo::GetDisplayWidth(nsTArray<uint32_t>& aDisplayWidth) {
-  aDisplayWidth.AppendElement((uint32_t)mScreenInfo.mScreenDimensions.width);
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-GfxInfo::GetDisplayHeight(nsTArray<uint32_t>& aDisplayHeight) {
-  aDisplayHeight.AppendElement((uint32_t)mScreenInfo.mScreenDimensions.height);
-  return NS_OK;
-}
-
 void GfxInfo::AddCrashReportAnnotations() {
   CrashReporter::AnnotateCrashReport(CrashReporter::Annotation::AdapterVendorID,
                                      mGLStrings->Vendor());
   CrashReporter::AnnotateCrashReport(CrashReporter::Annotation::AdapterDeviceID,
                                      mGLStrings->Renderer());
   CrashReporter::AnnotateCrashReport(
       CrashReporter::Annotation::AdapterDriverVersion, mGLStrings->Version());
 }
--- a/widget/android/GfxInfo.h
+++ b/widget/android/GfxInfo.h
@@ -32,34 +32,32 @@ class GfxInfo : public GfxInfoBase {
   NS_IMETHOD GetDWriteVersion(nsAString& aDwriteVersion) override;
   NS_IMETHOD GetCleartypeParameters(nsAString& aCleartypeParams) override;
   NS_IMETHOD GetWindowProtocol(nsAString& aWindowProtocol) override;
   NS_IMETHOD GetAdapterDescription(nsAString& aAdapterDescription) override;
   NS_IMETHOD GetAdapterDriver(nsAString& aAdapterDriver) override;
   NS_IMETHOD GetAdapterVendorID(nsAString& aAdapterVendorID) override;
   NS_IMETHOD GetAdapterDeviceID(nsAString& aAdapterDeviceID) override;
   NS_IMETHOD GetAdapterSubsysID(nsAString& aAdapterSubsysID) override;
-  NS_IMETHOD GetAdapterRAM(uint32_t* aAdapterRAM) override;
+  NS_IMETHOD GetAdapterRAM(nsAString& aAdapterRAM) override;
   NS_IMETHOD GetAdapterDriverVendor(nsAString& aAdapterDriverVendor) override;
   NS_IMETHOD GetAdapterDriverVersion(nsAString& aAdapterDriverVersion) override;
   NS_IMETHOD GetAdapterDriverDate(nsAString& aAdapterDriverDate) override;
   NS_IMETHOD GetAdapterDescription2(nsAString& aAdapterDescription) override;
   NS_IMETHOD GetAdapterDriver2(nsAString& aAdapterDriver) override;
   NS_IMETHOD GetAdapterVendorID2(nsAString& aAdapterVendorID) override;
   NS_IMETHOD GetAdapterDeviceID2(nsAString& aAdapterDeviceID) override;
   NS_IMETHOD GetAdapterSubsysID2(nsAString& aAdapterSubsysID) override;
-  NS_IMETHOD GetAdapterRAM2(uint32_t* aAdapterRAM) override;
+  NS_IMETHOD GetAdapterRAM2(nsAString& aAdapterRAM) override;
   NS_IMETHOD GetAdapterDriverVendor2(nsAString& aAdapterDriverVendor) override;
   NS_IMETHOD GetAdapterDriverVersion2(
       nsAString& aAdapterDriverVersion) override;
   NS_IMETHOD GetAdapterDriverDate2(nsAString& aAdapterDriverDate) override;
   NS_IMETHOD GetIsGPU2Active(bool* aIsGPU2Active) override;
   NS_IMETHOD GetDisplayInfo(nsTArray<nsString>& aDisplayInfo) override;
-  NS_IMETHOD GetDisplayWidth(nsTArray<uint32_t>& aDisplayWidth) override;
-  NS_IMETHOD GetDisplayHeight(nsTArray<uint32_t>& aDisplayHeight) override;
   using GfxInfoBase::GetFeatureStatus;
   using GfxInfoBase::GetFeatureSuggestedDriverVersion;
 
   void EnsureInitialized();
 
   virtual nsString Model() override;
   virtual nsString Hardware() override;
   virtual nsString Product() override;
--- a/widget/cocoa/GfxInfo.h
+++ b/widget/cocoa/GfxInfo.h
@@ -25,34 +25,32 @@ class GfxInfo : public GfxInfoBase {
   NS_IMETHOD GetDWriteVersion(nsAString& aDwriteVersion) override;
   NS_IMETHOD GetWindowProtocol(nsAString& aWindowProtocol) override;
   NS_IMETHOD GetCleartypeParameters(nsAString& aCleartypeParams) override;
   NS_IMETHOD GetAdapterDescription(nsAString& aAdapterDescription) override;
   NS_IMETHOD GetAdapterDriver(nsAString& aAdapterDriver) override;
   NS_IMETHOD GetAdapterVendorID(nsAString& aAdapterVendorID) override;
   NS_IMETHOD GetAdapterDeviceID(nsAString& aAdapterDeviceID) override;
   NS_IMETHOD GetAdapterSubsysID(nsAString& aAdapterSubsysID) override;
-  NS_IMETHOD GetAdapterRAM(uint32_t* aAdapterRAM) override;
+  NS_IMETHOD GetAdapterRAM(nsAString& aAdapterRAM) override;
   NS_IMETHOD GetAdapterDriverVendor(nsAString& aAdapterDriverVendor) override;
   NS_IMETHOD GetAdapterDriverVersion(nsAString& aAdapterDriverVersion) override;
   NS_IMETHOD GetAdapterDriverDate(nsAString& aAdapterDriverDate) override;
   NS_IMETHOD GetAdapterDescription2(nsAString& aAdapterDescription) override;
   NS_IMETHOD GetAdapterDriver2(nsAString& aAdapterDriver) override;
   NS_IMETHOD GetAdapterVendorID2(nsAString& aAdapterVendorID) override;
   NS_IMETHOD GetAdapterDeviceID2(nsAString& aAdapterDeviceID) override;
   NS_IMETHOD GetAdapterSubsysID2(nsAString& aAdapterSubsysID) override;
-  NS_IMETHOD GetAdapterRAM2(uint32_t* aAdapterRAM) override;
+  NS_IMETHOD GetAdapterRAM2(nsAString& aAdapterRAM) override;
   NS_IMETHOD GetAdapterDriverVendor2(nsAString& aAdapterDriverVendor) override;
   NS_IMETHOD GetAdapterDriverVersion2(
       nsAString& aAdapterDriverVersion) override;
   NS_IMETHOD GetAdapterDriverDate2(nsAString& aAdapterDriverDate) override;
   NS_IMETHOD GetIsGPU2Active(bool* aIsGPU2Active) override;
   NS_IMETHOD GetDisplayInfo(nsTArray<nsString>& aDisplayInfo) override;
-  NS_IMETHOD GetDisplayWidth(nsTArray<uint32_t>& aDisplayWidth) override;
-  NS_IMETHOD GetDisplayHeight(nsTArray<uint32_t>& aDisplayHeight) override;
 
   using GfxInfoBase::GetFeatureStatus;
   using GfxInfoBase::GetFeatureSuggestedDriverVersion;
 
   virtual nsresult Init() override;
 
 #ifdef DEBUG
   NS_DECL_ISUPPORTS_INHERITED
@@ -72,17 +70,17 @@ class GfxInfo : public GfxInfoBase {
       OperatingSystem* aOS = nullptr) override;
   virtual const nsTArray<GfxDriverInfo>& GetGfxDriverInfo() override;
 
  private:
   void GetDeviceInfo();
   void GetSelectedCityInfo();
   void AddCrashReportAnnotations();
 
-  nsString mAdapterRAM;
+  nsString mAdapterRAMString;
   nsString mDeviceID;
   nsString mDriverVersion;
   nsString mDriverDate;
   nsString mDeviceKey;
 
   nsString mAdapterVendorID;
   nsString mAdapterDeviceID;
 
--- a/widget/cocoa/GfxInfo.mm
+++ b/widget/cocoa/GfxInfo.mm
@@ -25,17 +25,17 @@
 
 using namespace mozilla;
 using namespace mozilla::widget;
 
 #ifdef DEBUG
 NS_IMPL_ISUPPORTS_INHERITED(GfxInfo, GfxInfoBase, nsIGfxInfoDebug)
 #endif
 
-GfxInfo::GfxInfo() : mOSXVersion{0}, mAdapterRAM(0) {}
+GfxInfo::GfxInfo() : mOSXVersion{0} {}
 
 static OperatingSystem OSXVersionToOperatingSystem(uint32_t aOSXVersion) {
   if (nsCocoaFeatures::ExtractMajorVersion(aOSXVersion) == 10) {
     switch (nsCocoaFeatures::ExtractMinorVersion(aOSXVersion)) {
       case 6:
         return OperatingSystem::OSX10_6;
       case 7:
         return OperatingSystem::OSX10_7;
@@ -134,24 +134,24 @@ GfxInfo::GetAdapterDescription(nsAString
 }
 
 /* readonly attribute DOMString adapterDescription2; */
 NS_IMETHODIMP
 GfxInfo::GetAdapterDescription2(nsAString& aAdapterDescription) { return NS_ERROR_FAILURE; }
 
 /* readonly attribute DOMString adapterRAM; */
 NS_IMETHODIMP
-GfxInfo::GetAdapterRAM(uint32_t* aAdapterRAM) {
-  *aAdapterRAM = mAdapterRAM;
+GfxInfo::GetAdapterRAM(nsAString& aAdapterRAM) {
+  aAdapterRAM = mAdapterRAMString;
   return NS_OK;
 }
 
 /* readonly attribute DOMString adapterRAM2; */
 NS_IMETHODIMP
-GfxInfo::GetAdapterRAM2(uint32_t* aAdapterRAM) { return NS_ERROR_FAILURE; }
+GfxInfo::GetAdapterRAM2(nsAString& aAdapterRAM) { return NS_ERROR_FAILURE; }
 
 /* readonly attribute DOMString adapterDriver; */
 NS_IMETHODIMP
 GfxInfo::GetAdapterDriver(nsAString& aAdapterDriver) {
   aAdapterDriver.AssignLiteral("");
   return NS_OK;
 }
 
@@ -231,34 +231,16 @@ GfxInfo::GetDisplayInfo(nsTArray<nsStrin
     desc.AppendPrintf("%dx%d scale:%f", (int32_t)rect.size.width, (int32_t)rect.size.height,
                       nsCocoaUtils::GetBackingScaleFactor(screen));
     aDisplayInfo.AppendElement(desc);
   }
 
   return NS_OK;
 }
 
-NS_IMETHODIMP
-GfxInfo::GetDisplayWidth(nsTArray<uint32_t>& aDisplayWidth) {
-  for (NSScreen* screen in [NSScreen screens]) {
-    NSRect rect = [screen frame];
-    aDisplayWidth.AppendElement((uint32_t)rect.size.width);
-  }
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-GfxInfo::GetDisplayHeight(nsTArray<uint32_t>& aDisplayHeight) {
-  for (NSScreen* screen in [NSScreen screens]) {
-    NSRect rect = [screen frame];
-    aDisplayHeight.AppendElement((uint32_t)rect.size.height);
-  }
-  return NS_OK;
-}
-
 /* readonly attribute boolean isGPU2Active; */
 NS_IMETHODIMP
 GfxInfo::GetIsGPU2Active(bool* aIsGPU2Active) { return NS_ERROR_FAILURE; }
 
 void GfxInfo::AddCrashReportAnnotations() {
   nsString deviceID, vendorID, driverVersion;
   nsAutoCString narrowDeviceID, narrowVendorID, narrowDriverVersion;
 
--- a/widget/nsIGfxInfo.idl
+++ b/widget/nsIGfxInfo.idl
@@ -55,36 +55,34 @@ interface nsIGfxInfo : nsISupports
   readonly attribute AString adapterDeviceID2;
 
   readonly attribute AString adapterSubsysID;
   readonly attribute AString adapterSubsysID2;
 
   /**
    * The amount of RAM in MB in the display adapter.
    */
-  readonly attribute unsigned long adapterRAM;
-  readonly attribute unsigned long adapterRAM2;
+  readonly attribute AString adapterRAM;
+  readonly attribute AString adapterRAM2;
 
   readonly attribute AString adapterDriverVendor;
   readonly attribute AString adapterDriverVendor2;
 
   readonly attribute AString adapterDriverVersion;
   readonly attribute AString adapterDriverVersion2;
 
   readonly attribute AString adapterDriverDate;
   readonly attribute AString adapterDriverDate2;
 
   readonly attribute boolean isGPU2Active;
 
   /**
    * Information about display devices
    */
   readonly attribute Array<AString> displayInfo;
-  readonly attribute Array<unsigned long> displayWidth;
-  readonly attribute Array<unsigned long> displayHeight;
 
   /**
    * Returns an array of objects describing each monitor. Guaranteed properties
    * are "screenWidth" and "screenHeight". This is only implemented on Desktop.
    *
    * Windows additionally supplies "refreshRate" and "pseudoDisplay".
    *
    * OS X additionally supplies "scale".
@@ -277,9 +275,8 @@ interface nsIGfxInfo : nsISupports
   [implicit_jscontext]
   jsval getActiveCrashGuards();
 
   // Forces the GPU process to start or shutdown. This is intended only for
   // xpcshell-tests.
   boolean controlGPUProcessForXPCShell(in boolean aEnable);
 };
 
-
--- a/widget/uikit/GfxInfo.cpp
+++ b/widget/uikit/GfxInfo.cpp
@@ -37,20 +37,20 @@ GfxInfo::GetAdapterDescription(nsAString
 }
 
 NS_IMETHODIMP
 GfxInfo::GetAdapterDescription2(nsAString& aAdapterDescription) {
   return NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP
-GfxInfo::GetAdapterRAM(uint32_t* aAdapterRAM) { return NS_ERROR_FAILURE; }
+GfxInfo::GetAdapterRAM(nsAString& aAdapterRAM) { return NS_ERROR_FAILURE; }
 
 NS_IMETHODIMP
-GfxInfo::GetAdapterRAM2(uint32_t* aAdapterRAM) { return NS_ERROR_FAILURE; }
+GfxInfo::GetAdapterRAM2(nsAString& aAdapterRAM) { return NS_ERROR_FAILURE; }
 
 NS_IMETHODIMP
 GfxInfo::GetAdapterDriver(nsAString& aAdapterDriver) {
   return NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP
 GfxInfo::GetAdapterDriver2(nsAString& aAdapterDriver) {
--- a/widget/uikit/GfxInfo.h
+++ b/widget/uikit/GfxInfo.h
@@ -35,25 +35,25 @@ class GfxInfo : public GfxInfoBase {
   NS_IMETHOD GetDWriteEnabled(bool* aDWriteEnabled) override;
   NS_IMETHOD GetDWriteVersion(nsAString& aDwriteVersion) override;
   NS_IMETHOD GetCleartypeParameters(nsAString& aCleartypeParams) override;
   NS_IMETHOD GetAdapterDescription(nsAString& aAdapterDescription) override;
   NS_IMETHOD GetAdapterDriver(nsAString& aAdapterDriver) override;
   NS_IMETHOD GetAdapterVendorID(nsAString& aAdapterVendorID) override;
   NS_IMETHOD GetAdapterDeviceID(nsAString& aAdapterDeviceID) override;
   NS_IMETHOD GetAdapterSubsysID(nsAString& aAdapterSubsysID) override;
-  NS_IMETHOD GetAdapterRAM(uint32_t* aAdapterRAM) override;
+  NS_IMETHOD GetAdapterRAM(nsAString& aAdapterRAM) override;
   NS_IMETHOD GetAdapterDriverVersion(nsAString& aAdapterDriverVersion) override;
   NS_IMETHOD GetAdapterDriverDate(nsAString& aAdapterDriverDate) override;
   NS_IMETHOD GetAdapterDescription2(nsAString& aAdapterDescription) override;
   NS_IMETHOD GetAdapterDriver2(nsAString& aAdapterDriver) override;
   NS_IMETHOD GetAdapterVendorID2(nsAString& aAdapterVendorID) override;
   NS_IMETHOD GetAdapterDeviceID2(nsAString& aAdapterDeviceID) override;
   NS_IMETHOD GetAdapterSubsysID2(nsAString& aAdapterSubsysID) override;
-  NS_IMETHOD GetAdapterRAM2(uint32_t* aAdapterRAM) override;
+  NS_IMETHOD GetAdapterRAM2(nsAString& aAdapterRAM) override;
   NS_IMETHOD GetAdapterDriverVersion2(
       nsAString& aAdapterDriverVersion) override;
   NS_IMETHOD GetAdapterDriverDate2(nsAString& aAdapterDriverDate) override;
   NS_IMETHOD GetIsGPU2Active(bool* aIsGPU2Active) override;
   using GfxInfoBase::GetFeatureStatus;
   using GfxInfoBase::GetFeatureSuggestedDriverVersion;
 
 #ifdef DEBUG
--- a/widget/windows/GfxInfo.cpp
+++ b/widget/windows/GfxInfo.cpp
@@ -127,18 +127,17 @@ GfxInfo::GetCleartypeParameters(nsAStrin
 }
 
 NS_IMETHODIMP
 GfxInfo::GetWindowProtocol(nsAString& aWindowProtocol) {
   return NS_ERROR_FAILURE;
 }
 
 static nsresult GetKeyValue(const WCHAR* keyLocation, const WCHAR* keyName,
-                            uint32_t& destValue, int type) {
-  MOZ_ASSERT(type == REG_DWORD || type == REG_QWORD);
+                            nsAString& destString, int type) {
   HKEY key;
   DWORD dwcbData;
   DWORD dValue;
   DWORD resultType;
   LONG result;
   nsresult retval = NS_OK;
 
   result =
@@ -149,89 +148,72 @@ static nsresult GetKeyValue(const WCHAR*
 
   switch (type) {
     case REG_DWORD: {
       // We only use this for vram size
       dwcbData = sizeof(dValue);
       result = RegQueryValueExW(key, keyName, nullptr, &resultType,
                                 (LPBYTE)&dValue, &dwcbData);
       if (result == ERROR_SUCCESS && resultType == REG_DWORD) {
-        destValue = (uint32_t)(dValue / 1024 / 1024);
+        dValue = dValue / 1024 / 1024;
+        destString.AppendInt(int32_t(dValue));
       } else {
         retval = NS_ERROR_FAILURE;
       }
       break;
     }
     case REG_QWORD: {
       // We only use this for vram size
       LONGLONG qValue;
       dwcbData = sizeof(qValue);
       result = RegQueryValueExW(key, keyName, nullptr, &resultType,
                                 (LPBYTE)&qValue, &dwcbData);
       if (result == ERROR_SUCCESS && resultType == REG_QWORD) {
-        destValue = (uint32_t)(qValue / 1024 / 1024);
+        qValue = qValue / 1024 / 1024;
+        destString.AppendInt(int32_t(qValue));
       } else {
         retval = NS_ERROR_FAILURE;
       }
       break;
     }
-  }
-  RegCloseKey(key);
-
-  return retval;
-}
-
-static nsresult GetKeyValue(const WCHAR* keyLocation, const WCHAR* keyName,
-                            nsAString& destString, int type) {
-  MOZ_ASSERT(type == REG_MULTI_SZ);
+    case REG_MULTI_SZ: {
+      // A chain of null-separated strings; we convert the nulls to spaces
+      WCHAR wCharValue[1024];
+      dwcbData = sizeof(wCharValue);
 
-  HKEY key;
-  DWORD dwcbData;
-  DWORD dValue;
-  DWORD resultType;
-  LONG result;
-  nsresult retval = NS_OK;
-
-  result =
-      RegOpenKeyExW(HKEY_LOCAL_MACHINE, keyLocation, 0, KEY_QUERY_VALUE, &key);
-  if (result != ERROR_SUCCESS) {
-    return NS_ERROR_FAILURE;
-  }
-
-  // A chain of null-separated strings; we convert the nulls to spaces
-  WCHAR wCharValue[1024];
-  dwcbData = sizeof(wCharValue);
+      result = RegQueryValueExW(key, keyName, nullptr, &resultType,
+                                (LPBYTE)wCharValue, &dwcbData);
+      if (result == ERROR_SUCCESS && resultType == REG_MULTI_SZ) {
+        // This bit here could probably be cleaner.
+        bool isValid = false;
 
-  result = RegQueryValueExW(key, keyName, nullptr, &resultType,
-                            (LPBYTE)wCharValue, &dwcbData);
-  if (result == ERROR_SUCCESS && resultType == REG_MULTI_SZ) {
-    // This bit here could probably be cleaner.
-    bool isValid = false;
+        DWORD strLen = dwcbData / sizeof(wCharValue[0]);
+        for (DWORD i = 0; i < strLen; i++) {
+          if (wCharValue[i] == '\0') {
+            if (i < strLen - 1 && wCharValue[i + 1] == '\0') {
+              isValid = true;
+              break;
+            } else {
+              wCharValue[i] = ' ';
+            }
+          }
+        }
 
-    DWORD strLen = dwcbData / sizeof(wCharValue[0]);
-    for (DWORD i = 0; i < strLen; i++) {
-      if (wCharValue[i] == '\0') {
-        if (i < strLen - 1 && wCharValue[i + 1] == '\0') {
-          isValid = true;
-          break;
-        } else {
-          wCharValue[i] = ' ';
-        }
+        // ensure wCharValue is null terminated
+        wCharValue[strLen - 1] = '\0';
+
+        if (isValid) destString = wCharValue;
+
+      } else {
+        retval = NS_ERROR_FAILURE;
       }
+
+      break;
     }
-
-    // ensure wCharValue is null terminated
-    wCharValue[strLen - 1] = '\0';
-
-    if (isValid) destString = wCharValue;
-
-  } else {
-    retval = NS_ERROR_FAILURE;
   }
-
   RegCloseKey(key);
 
   return retval;
 }
 
 static nsresult GetKeyValues(const WCHAR* keyLocation, const WCHAR* keyName,
                              nsTArray<nsString>& destStrings) {
   // First ask for the size of the value
@@ -782,32 +764,32 @@ GfxInfo::GetAdapterDescription(nsAString
 
 NS_IMETHODIMP
 GfxInfo::GetAdapterDescription2(nsAString& aAdapterDescription) {
   aAdapterDescription = mDeviceString[1 - mActiveGPUIndex];
   return NS_OK;
 }
 
 NS_IMETHODIMP
-GfxInfo::GetAdapterRAM(uint32_t* aAdapterRAM) {
+GfxInfo::GetAdapterRAM(nsAString& aAdapterRAM) {
   if (NS_FAILED(GetKeyValue(mDeviceKey[mActiveGPUIndex].get(),
                             L"HardwareInformation.qwMemorySize", aAdapterRAM,
                             REG_QWORD)) ||
       aAdapterRAM.Length() == 0) {
     if (NS_FAILED(GetKeyValue(mDeviceKey[mActiveGPUIndex].get(),
                               L"HardwareInformation.MemorySize", aAdapterRAM,
                               REG_DWORD))) {
       aAdapterRAM = L"Unknown";
     }
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
-GfxInfo::GetAdapterRAM2(uint32_t* aAdapterRAM) {
+GfxInfo::GetAdapterRAM2(nsAString& aAdapterRAM) {
   if (!mHasDualGPU) {
     aAdapterRAM.Truncate();
   } else if (NS_FAILED(GetKeyValue(mDeviceKey[1 - mActiveGPUIndex].get(),
                                    L"HardwareInformation.qwMemorySize",
                                    aAdapterRAM, REG_QWORD)) ||
              aAdapterRAM.Length() == 0) {
     if (NS_FAILED(GetKeyValue(mDeviceKey[1 - mActiveGPUIndex].get(),
                               L"HardwareInformation.MemorySize", aAdapterRAM,
@@ -928,32 +910,16 @@ GfxInfo::GetDisplayInfo(nsTArray<nsStrin
                        displayInfo.mIsPseudoDisplay ? "Pseudo Display" : "");
 
     aDisplayInfo.AppendElement(value);
   }
 
   return NS_OK;
 }
 
-NS_IMETHODIMP
-GfxInfo::GetDisplayWidth(nsTArray<uint32_t>& aDisplayWidth) {
-  for (auto displayInfo : mDisplayInfo) {
-    aDisplayWidth.AppendElement((uint32_t)displayInfo.mScreenWidth);
-  }
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-GfxInfo::GetDisplayHeight(nsTArray<uint32_t>& aDisplayHeight) {
-  for (auto displayInfo : mDisplayInfo) {
-    aDisplayHeight.AppendElement((uint32_t)displayInfo.mScreenHeight);
-  }
-  return NS_OK;
-}
-
 /* Cisco's VPN software can cause corruption of the floating point state.
  * Make a note of this in our crash reports so that some weird crashes
  * make more sense */
 static void CheckForCiscoVPN() {
   LONG result;
   HKEY key;
   /* This will give false positives, but hopefully no false negatives */
   result =
--- a/widget/windows/GfxInfo.h
+++ b/widget/windows/GfxInfo.h
@@ -26,34 +26,32 @@ class GfxInfo : public GfxInfoBase {
   NS_IMETHOD GetDWriteVersion(nsAString& aDwriteVersion) override;
   NS_IMETHOD GetCleartypeParameters(nsAString& aCleartypeParams) override;
   NS_IMETHOD GetWindowProtocol(nsAString& aWindowProtocol) override;
   NS_IMETHOD GetAdapterDescription(nsAString& aAdapterDescription) override;
   NS_IMETHOD GetAdapterDriver(nsAString& aAdapterDriver) override;
   NS_IMETHOD GetAdapterVendorID(nsAString& aAdapterVendorID) override;
   NS_IMETHOD GetAdapterDeviceID(nsAString& aAdapterDeviceID) override;
   NS_IMETHOD GetAdapterSubsysID(nsAString& aAdapterSubsysID) override;
-  NS_IMETHOD GetAdapterRAM(uint32_t* aAdapterRAM) override;
+  NS_IMETHOD GetAdapterRAM(nsAString& aAdapterRAM) override;
   NS_IMETHOD GetAdapterDriverVendor(nsAString& aAdapterDriverVendor) override;
   NS_IMETHOD GetAdapterDriverVersion(nsAString& aAdapterDriverVersion) override;
   NS_IMETHOD GetAdapterDriverDate(nsAString& aAdapterDriverDate) override;
   NS_IMETHOD GetAdapterDescription2(nsAString& aAdapterDescription) override;
   NS_IMETHOD GetAdapterDriver2(nsAString& aAdapterDriver) override;
   NS_IMETHOD GetAdapterVendorID2(nsAString& aAdapterVendorID) override;
   NS_IMETHOD GetAdapterDeviceID2(nsAString& aAdapterDeviceID) override;
   NS_IMETHOD GetAdapterSubsysID2(nsAString& aAdapterSubsysID) override;
-  NS_IMETHOD GetAdapterRAM2(uint32_t* aAdapterRAM) override;
+  NS_IMETHOD GetAdapterRAM2(nsAString& aAdapterRAM) override;
   NS_IMETHOD GetAdapterDriverVendor2(nsAString& aAdapterDriverVendor) override;
   NS_IMETHOD GetAdapterDriverVersion2(
       nsAString& aAdapterDriverVersion) override;
   NS_IMETHOD GetAdapterDriverDate2(nsAString& aAdapterDriverDate) override;
   NS_IMETHOD GetIsGPU2Active(bool* aIsGPU2Active) override;
   NS_IMETHOD GetDisplayInfo(nsTArray<nsString>& aDisplayInfo) override;
-  NS_IMETHOD GetDisplayWidth(nsTArray<uint32_t>& aDisplayWidth) override;
-  NS_IMETHOD GetDisplayHeight(nsTArray<uint32_t>& aDisplayHeight) override;
   using GfxInfoBase::GetFeatureStatus;
   using GfxInfoBase::GetFeatureSuggestedDriverVersion;
 
   virtual nsresult Init() override;
 
   virtual uint32_t OperatingSystemVersion() override { return mWindowsVersion; }
 
   nsresult FindMonitors(JSContext* cx, JS::HandleObject array) override;