diff --git a/gfx/layers/LayersTypes.cpp b/gfx/layers/LayersTypes.cpp index 857b6f2f9bca..51583b68862d 100644 --- a/gfx/layers/LayersTypes.cpp +++ b/gfx/layers/LayersTypes.cpp @@ -9,6 +9,26 @@ 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, diff --git a/gfx/layers/LayersTypes.h b/gfx/layers/LayersTypes.h index 0b549d58ee8d..7b43d082e5d1 100644 --- a/gfx/layers/LayersTypes.h +++ b/gfx/layers/LayersTypes.h @@ -155,6 +155,8 @@ enum class LayersBackend : int8_t { LAYERS_LAST }; +const char* GetLayersBackendName(LayersBackend aBackend); + enum class TextureType : int8_t { Unknown = 0, D3D11, diff --git a/gfx/thebes/gfxPlatform.cpp b/gfx/thebes/gfxPlatform.cpp index 6ec247da7e94..1afe8c0c0b94 100644 --- a/gfx/thebes/gfxPlatform.cpp +++ b/gfx/thebes/gfxPlatform.cpp @@ -1106,12 +1106,82 @@ void gfxPlatform::Init() { } } + if (XRE_IsParentProcess()) { + ReportTelemetry(); + } + nsCOMPtr 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 gfxInfo = services::GetGfxInfo(); + nsTArray displayWidths; + nsTArray 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 gfxInfo = services::GetGfxInfo(); nsCString blockId; @@ -3596,6 +3666,12 @@ void gfxPlatform::NotifyCompositorCreated(LayersBackend 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", [] { diff --git a/gfx/thebes/gfxPlatform.h b/gfx/thebes/gfxPlatform.h index 1cbec19d5e9c..d67be3aa7862 100644 --- a/gfx/thebes/gfxPlatform.h +++ b/gfx/thebes/gfxPlatform.h @@ -898,6 +898,9 @@ class gfxPlatform : public mozilla::layers::MemoryPressureListener { 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(); diff --git a/toolkit/components/telemetry/Scalars.yaml b/toolkit/components/telemetry/Scalars.yaml index c267bb838ee7..0ca1f96a2a1f 100644 --- a/toolkit/components/telemetry/Scalars.yaml +++ b/toolkit/components/telemetry/Scalars.yaml @@ -2805,6 +2805,221 @@ gfx.hdr: 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: diff --git a/toolkit/components/telemetry/geckoview/streaming/metrics.yaml b/toolkit/components/telemetry/geckoview/streaming/metrics.yaml index 75e8db98c3e3..c1b56ebda4c5 100644 --- a/toolkit/components/telemetry/geckoview/streaming/metrics.yaml +++ b/toolkit/components/telemetry/geckoview/streaming/metrics.yaml @@ -391,6 +391,211 @@ gfx.webrender: - 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 + sceneswap_time: type: timing_distribution time_unit: millisecond diff --git a/toolkit/xre/glxtest.cpp b/toolkit/xre/glxtest.cpp index bd462ff702af..7b33a5c2b08f 100644 --- a/toolkit/xre/glxtest.cpp +++ b/toolkit/xre/glxtest.cpp @@ -366,8 +366,8 @@ void glxtest() { int current_width = scrn->width; length += - snprintf(buf + length, bufsize - length, "%dx%d%s%s", current_width, - current_height, idx == defaultScreen ? " default" : "", + snprintf(buf + length, bufsize - length, "%dx%d:%d%s", current_width, + current_height, idx == defaultScreen ? 1 : 0, idx == screenCount - 1 ? ";\n" : ";"); if (length >= bufsize) fatal_error("Screen Info strings length too large for buffer size"); diff --git a/widget/GfxInfoBase.cpp b/widget/GfxInfoBase.cpp index d44753f19959..09346d6d3cc6 100644 --- a/widget/GfxInfoBase.cpp +++ b/widget/GfxInfoBase.cpp @@ -1245,26 +1245,6 @@ GfxInfoBase::GetMonitors(JSContext* aCx, JS::MutableHandleValue aResult) { 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 aObj, const char* aProp, const char* aString) { @@ -1299,7 +1279,7 @@ nsresult GfxInfoBase::GetFeatures(JSContext* aCx, gfxPlatform::Initialized() ? gfxPlatform::GetPlatform()->GetCompositorBackend() : layers::LayersBackend::LAYERS_NONE; - const char* backendName = GetLayersBackendName(backend); + const char* backendName = layers::GetLayersBackendName(backend); SetJSPropertyString(aCx, obj, "compositor", backendName); // If graphics isn't initialized yet, just stop now. diff --git a/widget/GfxInfoX11.cpp b/widget/GfxInfoX11.cpp index 05b17495575e..2756992e13ab 100644 --- a/widget/GfxInfoX11.cpp +++ b/widget/GfxInfoX11.cpp @@ -132,8 +132,10 @@ void GfxInfo::GetData() { // Available if using a DRI-based libGL stack. nsCString driDriver; nsCString screenInfo; + nsCString adapterRam; nsCString* stringToFill = nullptr; + char* bufptr = buf; if (!error) { while (true) { @@ -157,7 +159,7 @@ void GfxInfo::GetData() { else if (!strcmp(line, "MESA_ACCELERATED")) stringToFill = &mesaAccelerated; else if (!strcmp(line, "MESA_VRAM")) - stringToFill = &mAdapterRAM; + stringToFill = &adapterRam; else if (!strcmp(line, "DRI_DRIVER")) stringToFill = &driDriver; else if (!strcmp(line, "SCREEN_INFO")) @@ -297,16 +299,24 @@ void GfxInfo::GetData() { PRInt32 start = 0; PRInt32 loc = screenInfo.Find(";", PR_FALSE, start); while (loc != kNotFound) { + int isDefault = 0; nsCString line(screenInfo.get() + start, loc - start); - nsString value; - CopyASCIItoUTF16(line, value); + ScreenInfo info; + if (sscanf(line.get(), "%ux%u:%u", &info.mWidth, &info.mHeight, + &isDefault) == 3) { + info.mIsDefault = isDefault != 0; + mScreenInfo.AppendElement(info); + } - 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()); @@ -512,14 +522,14 @@ GfxInfo::GetAdapterDescription2(nsAString& aAdapterDescription) { } NS_IMETHODIMP -GfxInfo::GetAdapterRAM(nsAString& aAdapterRAM) { +GfxInfo::GetAdapterRAM(uint32_t* aAdapterRAM) { GetData(); - CopyUTF8toUTF16(mAdapterRAM, aAdapterRAM); + *aAdapterRAM = mAdapterRAM; return NS_OK; } NS_IMETHODIMP -GfxInfo::GetAdapterRAM2(nsAString& aAdapterRAM) { return NS_ERROR_FAILURE; } +GfxInfo::GetAdapterRAM2(uint32_t* aAdapterRAM) { return NS_ERROR_FAILURE; } NS_IMETHODIMP GfxInfo::GetAdapterDriver(nsAString& aAdapterDriver) { @@ -604,12 +614,31 @@ GfxInfo::GetAdapterSubsysID2(nsAString& aAdapterSubsysID) { NS_IMETHODIMP GfxInfo::GetDisplayInfo(nsTArray& aDisplayInfo) { GetData(); - if (!mScreenInfo.IsEmpty()) { - aDisplayInfo = mScreenInfo; - return NS_OK; + for (auto screenInfo : mScreenInfo) { + nsString infoString; + infoString.AppendPrintf("%dx%d %s", screenInfo.mWidth, screenInfo.mHeight, + screenInfo.mIsDefault ? "default" : ""); + aDisplayInfo.AppendElement(infoString); } - return NS_ERROR_FAILURE; + + return aDisplayInfo.IsEmpty() ? NS_ERROR_FAILURE : NS_OK; +} + +NS_IMETHODIMP +GfxInfo::GetDisplayWidth(nsTArray& aDisplayWidth) { + for (auto screenInfo : mScreenInfo) { + aDisplayWidth.AppendElement((uint32_t)screenInfo.mWidth); + } + return NS_OK; +} + +NS_IMETHODIMP +GfxInfo::GetDisplayHeight(nsTArray& aDisplayHeight) { + for (auto screenInfo : mScreenInfo) { + aDisplayHeight.AppendElement((uint32_t)screenInfo.mHeight); + } + return NS_OK; } NS_IMETHODIMP diff --git a/widget/GfxInfoX11.h b/widget/GfxInfoX11.h index b92cadb7a295..dff3206946ff 100644 --- a/widget/GfxInfoX11.h +++ b/widget/GfxInfoX11.h @@ -28,7 +28,7 @@ class GfxInfo final : public GfxInfoBase { NS_IMETHOD GetAdapterVendorID(nsAString& aAdapterVendorID) override; NS_IMETHOD GetAdapterDeviceID(nsAString& aAdapterDeviceID) override; NS_IMETHOD GetAdapterSubsysID(nsAString& aAdapterSubsysID) override; - NS_IMETHOD GetAdapterRAM(nsAString& aAdapterRAM) override; + NS_IMETHOD GetAdapterRAM(uint32_t* aAdapterRAM) override; NS_IMETHOD GetAdapterDriverVendor(nsAString& aAdapterDriverVendor) override; NS_IMETHOD GetAdapterDriverVersion(nsAString& aAdapterDriverVersion) override; NS_IMETHOD GetAdapterDriverDate(nsAString& aAdapterDriverDate) override; @@ -37,13 +37,15 @@ class GfxInfo final : public GfxInfoBase { NS_IMETHOD GetAdapterVendorID2(nsAString& aAdapterVendorID) override; NS_IMETHOD GetAdapterDeviceID2(nsAString& aAdapterDeviceID) override; NS_IMETHOD GetAdapterSubsysID2(nsAString& aAdapterSubsysID) override; - NS_IMETHOD GetAdapterRAM2(nsAString& aAdapterRAM) override; + NS_IMETHOD GetAdapterRAM2(uint32_t* 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& aDisplayInfo) override; + NS_IMETHOD GetDisplayWidth(nsTArray& aDisplayWidth) override; + NS_IMETHOD GetDisplayHeight(nsTArray& aDisplayHeight) override; using GfxInfoBase::GetFeatureStatus; using GfxInfoBase::GetFeatureSuggestedDriverVersion; @@ -74,10 +76,17 @@ class GfxInfo final : public GfxInfoBase { nsCString mDriverVendor; nsCString mDriverVersion; nsCString mAdapterDescription; - nsCString mAdapterRAM; + uint32_t mAdapterRAM; nsCString mOS; nsCString mOSRelease; - nsTArray mScreenInfo; + + struct ScreenInfo { + uint32_t mWidth; + uint32_t mHeight; + bool mIsDefault; + }; + + nsTArray mScreenInfo; bool mHasTextureFromPixmap; unsigned int mGLMajorVersion, mGLMinorVersion; bool mIsMesa; diff --git a/widget/android/GfxInfo.cpp b/widget/android/GfxInfo.cpp index 26ab46c036a7..eb5d2ce5c0be 100644 --- a/widget/android/GfxInfo.cpp +++ b/widget/android/GfxInfo.cpp @@ -226,14 +226,14 @@ GfxInfo::GetAdapterDescription2(nsAString& aAdapterDescription) { } NS_IMETHODIMP -GfxInfo::GetAdapterRAM(nsAString& aAdapterRAM) { +GfxInfo::GetAdapterRAM(uint32_t* aAdapterRAM) { EnsureInitialized(); - aAdapterRAM.Truncate(); + *aAdapterRAM = 0; return NS_OK; } NS_IMETHODIMP -GfxInfo::GetAdapterRAM2(nsAString& aAdapterRAM) { +GfxInfo::GetAdapterRAM2(uint32_t* aAdapterRAM) { EnsureInitialized(); return NS_ERROR_FAILURE; } @@ -345,6 +345,18 @@ GfxInfo::GetDisplayInfo(nsTArray& aDisplayInfo) { return NS_OK; } +NS_IMETHODIMP +GfxInfo::GetDisplayWidth(nsTArray& aDisplayWidth) { + aDisplayWidth.AppendElement((uint32_t)mScreenInfo.mScreenDimensions.width); + return NS_OK; +} + +NS_IMETHODIMP +GfxInfo::GetDisplayHeight(nsTArray& aDisplayHeight) { + aDisplayHeight.AppendElement((uint32_t)mScreenInfo.mScreenDimensions.height); + return NS_OK; +} + void GfxInfo::AddCrashReportAnnotations() { CrashReporter::AnnotateCrashReport(CrashReporter::Annotation::AdapterVendorID, mGLStrings->Vendor()); diff --git a/widget/android/GfxInfo.h b/widget/android/GfxInfo.h index 5b49ec9b09ad..c420df7ca85e 100644 --- a/widget/android/GfxInfo.h +++ b/widget/android/GfxInfo.h @@ -37,7 +37,7 @@ class GfxInfo : public GfxInfoBase { NS_IMETHOD GetAdapterVendorID(nsAString& aAdapterVendorID) override; NS_IMETHOD GetAdapterDeviceID(nsAString& aAdapterDeviceID) override; NS_IMETHOD GetAdapterSubsysID(nsAString& aAdapterSubsysID) override; - NS_IMETHOD GetAdapterRAM(nsAString& aAdapterRAM) override; + NS_IMETHOD GetAdapterRAM(uint32_t* aAdapterRAM) override; NS_IMETHOD GetAdapterDriverVendor(nsAString& aAdapterDriverVendor) override; NS_IMETHOD GetAdapterDriverVersion(nsAString& aAdapterDriverVersion) override; NS_IMETHOD GetAdapterDriverDate(nsAString& aAdapterDriverDate) override; @@ -46,13 +46,15 @@ class GfxInfo : public GfxInfoBase { NS_IMETHOD GetAdapterVendorID2(nsAString& aAdapterVendorID) override; NS_IMETHOD GetAdapterDeviceID2(nsAString& aAdapterDeviceID) override; NS_IMETHOD GetAdapterSubsysID2(nsAString& aAdapterSubsysID) override; - NS_IMETHOD GetAdapterRAM2(nsAString& aAdapterRAM) override; + NS_IMETHOD GetAdapterRAM2(uint32_t* 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& aDisplayInfo) override; + NS_IMETHOD GetDisplayWidth(nsTArray& aDisplayWidth) override; + NS_IMETHOD GetDisplayHeight(nsTArray& aDisplayHeight) override; using GfxInfoBase::GetFeatureStatus; using GfxInfoBase::GetFeatureSuggestedDriverVersion; diff --git a/widget/cocoa/GfxInfo.h b/widget/cocoa/GfxInfo.h index 3acbeaf0eeb3..ed16f22be0d6 100644 --- a/widget/cocoa/GfxInfo.h +++ b/widget/cocoa/GfxInfo.h @@ -30,7 +30,7 @@ class GfxInfo : public GfxInfoBase { NS_IMETHOD GetAdapterVendorID(nsAString& aAdapterVendorID) override; NS_IMETHOD GetAdapterDeviceID(nsAString& aAdapterDeviceID) override; NS_IMETHOD GetAdapterSubsysID(nsAString& aAdapterSubsysID) override; - NS_IMETHOD GetAdapterRAM(nsAString& aAdapterRAM) override; + NS_IMETHOD GetAdapterRAM(uint32_t* aAdapterRAM) override; NS_IMETHOD GetAdapterDriverVendor(nsAString& aAdapterDriverVendor) override; NS_IMETHOD GetAdapterDriverVersion(nsAString& aAdapterDriverVersion) override; NS_IMETHOD GetAdapterDriverDate(nsAString& aAdapterDriverDate) override; @@ -39,13 +39,15 @@ class GfxInfo : public GfxInfoBase { NS_IMETHOD GetAdapterVendorID2(nsAString& aAdapterVendorID) override; NS_IMETHOD GetAdapterDeviceID2(nsAString& aAdapterDeviceID) override; NS_IMETHOD GetAdapterSubsysID2(nsAString& aAdapterSubsysID) override; - NS_IMETHOD GetAdapterRAM2(nsAString& aAdapterRAM) override; + NS_IMETHOD GetAdapterRAM2(uint32_t* 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& aDisplayInfo) override; + NS_IMETHOD GetDisplayWidth(nsTArray& aDisplayWidth) override; + NS_IMETHOD GetDisplayHeight(nsTArray& aDisplayHeight) override; using GfxInfoBase::GetFeatureStatus; using GfxInfoBase::GetFeatureSuggestedDriverVersion; @@ -75,7 +77,7 @@ class GfxInfo : public GfxInfoBase { void GetSelectedCityInfo(); void AddCrashReportAnnotations(); - nsString mAdapterRAMString; + uint32_t mAdapterRAM; nsString mDeviceID; nsString mDriverVersion; nsString mDriverDate; diff --git a/widget/cocoa/GfxInfo.mm b/widget/cocoa/GfxInfo.mm index f9529905295d..e9ba406a5496 100644 --- a/widget/cocoa/GfxInfo.mm +++ b/widget/cocoa/GfxInfo.mm @@ -30,7 +30,7 @@ using namespace mozilla::widget; NS_IMPL_ISUPPORTS_INHERITED(GfxInfo, GfxInfoBase, nsIGfxInfoDebug) #endif -GfxInfo::GfxInfo() : mOSXVersion{0} {} +GfxInfo::GfxInfo() : mAdapterRAM(0), mOSXVersion{0} {} static OperatingSystem OSXVersionToOperatingSystem(uint32_t aOSXVersion) { if (nsCocoaFeatures::ExtractMajorVersion(aOSXVersion) == 10) { @@ -139,14 +139,14 @@ GfxInfo::GetAdapterDescription2(nsAString& aAdapterDescription) { return NS_ERRO /* readonly attribute DOMString adapterRAM; */ NS_IMETHODIMP -GfxInfo::GetAdapterRAM(nsAString& aAdapterRAM) { - aAdapterRAM = mAdapterRAMString; +GfxInfo::GetAdapterRAM(uint32_t* aAdapterRAM) { + *aAdapterRAM = mAdapterRAM; return NS_OK; } /* readonly attribute DOMString adapterRAM2; */ NS_IMETHODIMP -GfxInfo::GetAdapterRAM2(nsAString& aAdapterRAM) { return NS_ERROR_FAILURE; } +GfxInfo::GetAdapterRAM2(uint32_t* aAdapterRAM) { return NS_ERROR_FAILURE; } /* readonly attribute DOMString adapterDriver; */ NS_IMETHODIMP @@ -236,6 +236,24 @@ GfxInfo::GetDisplayInfo(nsTArray& aDisplayInfo) { return NS_OK; } +NS_IMETHODIMP +GfxInfo::GetDisplayWidth(nsTArray& 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& 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; } diff --git a/widget/nsIGfxInfo.idl b/widget/nsIGfxInfo.idl index bffa8304b180..a65c22e0d964 100644 --- a/widget/nsIGfxInfo.idl +++ b/widget/nsIGfxInfo.idl @@ -60,8 +60,8 @@ interface nsIGfxInfo : nsISupports /** * The amount of RAM in MB in the display adapter. */ - readonly attribute AString adapterRAM; - readonly attribute AString adapterRAM2; + readonly attribute unsigned long adapterRAM; + readonly attribute unsigned long adapterRAM2; readonly attribute AString adapterDriverVendor; readonly attribute AString adapterDriverVendor2; @@ -78,6 +78,8 @@ interface nsIGfxInfo : nsISupports * Information about display devices */ readonly attribute Array displayInfo; + readonly attribute Array displayWidth; + readonly attribute Array displayHeight; /** * Returns an array of objects describing each monitor. Guaranteed properties @@ -280,3 +282,4 @@ interface nsIGfxInfo : nsISupports boolean controlGPUProcessForXPCShell(in boolean aEnable); }; + diff --git a/widget/uikit/GfxInfo.cpp b/widget/uikit/GfxInfo.cpp index 25a40c0ed19f..fd69eb43ef4f 100644 --- a/widget/uikit/GfxInfo.cpp +++ b/widget/uikit/GfxInfo.cpp @@ -42,10 +42,10 @@ GfxInfo::GetAdapterDescription2(nsAString& aAdapterDescription) { } NS_IMETHODIMP -GfxInfo::GetAdapterRAM(nsAString& aAdapterRAM) { return NS_ERROR_FAILURE; } +GfxInfo::GetAdapterRAM(uint32_t* aAdapterRAM) { return NS_ERROR_FAILURE; } NS_IMETHODIMP -GfxInfo::GetAdapterRAM2(nsAString& aAdapterRAM) { return NS_ERROR_FAILURE; } +GfxInfo::GetAdapterRAM2(uint32_t* aAdapterRAM) { return NS_ERROR_FAILURE; } NS_IMETHODIMP GfxInfo::GetAdapterDriver(nsAString& aAdapterDriver) { diff --git a/widget/uikit/GfxInfo.h b/widget/uikit/GfxInfo.h index ab99386ee862..fe75e28d230f 100644 --- a/widget/uikit/GfxInfo.h +++ b/widget/uikit/GfxInfo.h @@ -40,7 +40,7 @@ class GfxInfo : public GfxInfoBase { NS_IMETHOD GetAdapterVendorID(nsAString& aAdapterVendorID) override; NS_IMETHOD GetAdapterDeviceID(nsAString& aAdapterDeviceID) override; NS_IMETHOD GetAdapterSubsysID(nsAString& aAdapterSubsysID) override; - NS_IMETHOD GetAdapterRAM(nsAString& aAdapterRAM) override; + NS_IMETHOD GetAdapterRAM(uint32_t* aAdapterRAM) override; NS_IMETHOD GetAdapterDriverVersion(nsAString& aAdapterDriverVersion) override; NS_IMETHOD GetAdapterDriverDate(nsAString& aAdapterDriverDate) override; NS_IMETHOD GetAdapterDescription2(nsAString& aAdapterDescription) override; @@ -48,7 +48,7 @@ class GfxInfo : public GfxInfoBase { NS_IMETHOD GetAdapterVendorID2(nsAString& aAdapterVendorID) override; NS_IMETHOD GetAdapterDeviceID2(nsAString& aAdapterDeviceID) override; NS_IMETHOD GetAdapterSubsysID2(nsAString& aAdapterSubsysID) override; - NS_IMETHOD GetAdapterRAM2(nsAString& aAdapterRAM) override; + NS_IMETHOD GetAdapterRAM2(uint32_t* aAdapterRAM) override; NS_IMETHOD GetAdapterDriverVersion2( nsAString& aAdapterDriverVersion) override; NS_IMETHOD GetAdapterDriverDate2(nsAString& aAdapterDriverDate) override; diff --git a/widget/windows/GfxInfo.cpp b/widget/windows/GfxInfo.cpp index e6b1885825b9..5cb96d32c019 100644 --- a/widget/windows/GfxInfo.cpp +++ b/widget/windows/GfxInfo.cpp @@ -132,7 +132,8 @@ GfxInfo::GetWindowProtocol(nsAString& aWindowProtocol) { } static nsresult GetKeyValue(const WCHAR* keyLocation, const WCHAR* keyName, - nsAString& destString, int type) { + uint32_t& destValue, int type) { + MOZ_ASSERT(type == REG_DWORD || type == REG_QWORD); HKEY key; DWORD dwcbData; DWORD dValue; @@ -153,8 +154,7 @@ static nsresult GetKeyValue(const WCHAR* keyLocation, const WCHAR* keyName, result = RegQueryValueExW(key, keyName, nullptr, &resultType, (LPBYTE)&dValue, &dwcbData); if (result == ERROR_SUCCESS && resultType == REG_DWORD) { - dValue = dValue / 1024 / 1024; - destString.AppendInt(int32_t(dValue)); + destValue = (uint32_t)(dValue / 1024 / 1024); } else { retval = NS_ERROR_FAILURE; } @@ -167,53 +167,70 @@ static nsresult GetKeyValue(const WCHAR* keyLocation, const WCHAR* keyName, result = RegQueryValueExW(key, keyName, nullptr, &resultType, (LPBYTE)&qValue, &dwcbData); if (result == ERROR_SUCCESS && resultType == REG_QWORD) { - qValue = qValue / 1024 / 1024; - destString.AppendInt(int32_t(qValue)); + destValue = (uint32_t)(qValue / 1024 / 1024); } else { retval = NS_ERROR_FAILURE; } break; } - case REG_MULTI_SZ: { - // 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; - - 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; - } } RegCloseKey(key); return retval; } +static nsresult GetKeyValue(const WCHAR* keyLocation, const WCHAR* keyName, + nsAString& destString, int type) { + MOZ_ASSERT(type == REG_MULTI_SZ); + + HKEY key; + DWORD dwcbData; + 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; + + 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; + } + + RegCloseKey(key); + + return retval; +} + static nsresult GetKeyValues(const WCHAR* keyLocation, const WCHAR* keyName, nsTArray& destStrings) { // First ask for the size of the value @@ -769,34 +786,38 @@ GfxInfo::GetAdapterDescription2(nsAString& aAdapterDescription) { } NS_IMETHODIMP -GfxInfo::GetAdapterRAM(nsAString& aAdapterRAM) { +GfxInfo::GetAdapterRAM(uint32_t* aAdapterRAM) { + uint32_t result = 0; if (NS_FAILED(GetKeyValue(mDeviceKey[mActiveGPUIndex].get(), - L"HardwareInformation.qwMemorySize", aAdapterRAM, + L"HardwareInformation.qwMemorySize", result, REG_QWORD)) || - aAdapterRAM.Length() == 0) { + result == 0) { if (NS_FAILED(GetKeyValue(mDeviceKey[mActiveGPUIndex].get(), - L"HardwareInformation.MemorySize", aAdapterRAM, + L"HardwareInformation.MemorySize", result, REG_DWORD))) { - aAdapterRAM = L"Unknown"; + result = 0; } } + *aAdapterRAM = result; return NS_OK; } NS_IMETHODIMP -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) { +GfxInfo::GetAdapterRAM2(uint32_t* aAdapterRAM) { + uint32_t result = 0; + if (mHasDualGPU) { if (NS_FAILED(GetKeyValue(mDeviceKey[1 - mActiveGPUIndex].get(), - L"HardwareInformation.MemorySize", aAdapterRAM, - REG_DWORD))) { - aAdapterRAM = L"Unknown"; + L"HardwareInformation.qwMemorySize", result, + REG_QWORD)) || + result == 0) { + if (NS_FAILED(GetKeyValue(mDeviceKey[1 - mActiveGPUIndex].get(), + L"HardwareInformation.MemorySize", result, + REG_DWORD))) { + result = 0; + } } } + *aAdapterRAM = result; return NS_OK; } @@ -915,6 +936,22 @@ GfxInfo::GetDisplayInfo(nsTArray& aDisplayInfo) { return NS_OK; } +NS_IMETHODIMP +GfxInfo::GetDisplayWidth(nsTArray& aDisplayWidth) { + for (auto displayInfo : mDisplayInfo) { + aDisplayWidth.AppendElement((uint32_t)displayInfo.mScreenWidth); + } + return NS_OK; +} + +NS_IMETHODIMP +GfxInfo::GetDisplayHeight(nsTArray& 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 */ diff --git a/widget/windows/GfxInfo.h b/widget/windows/GfxInfo.h index 26345a791724..53d2ecb504bf 100644 --- a/widget/windows/GfxInfo.h +++ b/widget/windows/GfxInfo.h @@ -31,7 +31,7 @@ class GfxInfo : public GfxInfoBase { NS_IMETHOD GetAdapterVendorID(nsAString& aAdapterVendorID) override; NS_IMETHOD GetAdapterDeviceID(nsAString& aAdapterDeviceID) override; NS_IMETHOD GetAdapterSubsysID(nsAString& aAdapterSubsysID) override; - NS_IMETHOD GetAdapterRAM(nsAString& aAdapterRAM) override; + NS_IMETHOD GetAdapterRAM(uint32_t* aAdapterRAM) override; NS_IMETHOD GetAdapterDriverVendor(nsAString& aAdapterDriverVendor) override; NS_IMETHOD GetAdapterDriverVersion(nsAString& aAdapterDriverVersion) override; NS_IMETHOD GetAdapterDriverDate(nsAString& aAdapterDriverDate) override; @@ -40,13 +40,15 @@ class GfxInfo : public GfxInfoBase { NS_IMETHOD GetAdapterVendorID2(nsAString& aAdapterVendorID) override; NS_IMETHOD GetAdapterDeviceID2(nsAString& aAdapterDeviceID) override; NS_IMETHOD GetAdapterSubsysID2(nsAString& aAdapterSubsysID) override; - NS_IMETHOD GetAdapterRAM2(nsAString& aAdapterRAM) override; + NS_IMETHOD GetAdapterRAM2(uint32_t* 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& aDisplayInfo) override; + NS_IMETHOD GetDisplayWidth(nsTArray& aDisplayWidth) override; + NS_IMETHOD GetDisplayHeight(nsTArray& aDisplayHeight) override; using GfxInfoBase::GetFeatureStatus; using GfxInfoBase::GetFeatureSuggestedDriverVersion;