summaryrefslogtreecommitdiffstats
path: root/widget/GfxInfoBase.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-08 15:11:26 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-08 15:11:26 +0000
commitfcea19dfd2c426bac0456da850e7c12258e4b9eb (patch)
treea31f07c9bcca9d56ce61e9a1ffd30ef350d513aa /widget/GfxInfoBase.cpp
parentAdding upstream version 115.7.0esr. (diff)
downloadfirefox-esr-3512beca9241712547078681b1a5f1f64df34543.tar.xz
firefox-esr-3512beca9241712547078681b1a5f1f64df34543.zip
Adding upstream version 115.8.0esr.upstream/115.8.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'widget/GfxInfoBase.cpp')
-rw-r--r--widget/GfxInfoBase.cpp29
1 files changed, 27 insertions, 2 deletions
diff --git a/widget/GfxInfoBase.cpp b/widget/GfxInfoBase.cpp
index 66dd10da8a..f33702ae85 100644
--- a/widget/GfxInfoBase.cpp
+++ b/widget/GfxInfoBase.cpp
@@ -30,6 +30,7 @@
#include "mozilla/Preferences.h"
#include "mozilla/StaticPrefs_gfx.h"
#include "mozilla/gfx/2D.h"
+#include "mozilla/gfx/BuildConstants.h"
#include "mozilla/gfx/GPUProcessManager.h"
#include "mozilla/gfx/Logging.h"
#include "mozilla/gfx/gfxVars.h"
@@ -1297,8 +1298,12 @@ nsresult GfxInfoBase::GetFeatureStatusImpl(
if (NS_FAILED(GetAdapterVendorID(adapterVendorID)) ||
NS_FAILED(GetAdapterDeviceID(adapterDeviceID)) ||
NS_FAILED(GetAdapterDriverVersion(adapterDriverVersionString))) {
- aFailureId = "FEATURE_FAILURE_CANT_RESOLVE_ADAPTER";
- *aStatus = FEATURE_BLOCKED_DEVICE;
+ if (OnlyAllowFeatureOnKnownConfig(aFeature)) {
+ aFailureId = "FEATURE_FAILURE_CANT_RESOLVE_ADAPTER";
+ *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DEVICE;
+ } else {
+ *aStatus = nsIGfxInfo::FEATURE_STATUS_OK;
+ }
return NS_OK;
}
@@ -1512,6 +1517,26 @@ const nsCString& GfxInfoBase::GetApplicationVersion() {
return gBaseAppVersion;
}
+/* static */ bool GfxInfoBase::OnlyAllowFeatureOnKnownConfig(int32_t aFeature) {
+ switch (aFeature) {
+ // The GPU process doesn't need hardware acceleration and can run on
+ // devices that we normally block from not being on our whitelist.
+ case nsIGfxInfo::FEATURE_GPU_PROCESS:
+ return kIsAndroid;
+ // We can mostly assume that ANGLE will work
+ case nsIGfxInfo::FEATURE_DIRECT3D_11_ANGLE:
+ // Remote WebGL is needed for Win32k Lockdown, so it should be enabled
+ // regardless of HW support or not
+ case nsIGfxInfo::FEATURE_ALLOW_WEBGL_OUT_OF_PROCESS:
+ // Backdrop filter should generally work, especially if we fall back to
+ // Software WebRender because of an unknown vendor.
+ case nsIGfxInfo::FEATURE_BACKDROP_FILTER:
+ return false;
+ default:
+ return true;
+ }
+}
+
void GfxInfoBase::AddCollector(GfxInfoCollectorBase* collector) {
InitCollectors();
sCollectors->AppendElement(collector);