diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /widget/GfxInfoBase.cpp | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'widget/GfxInfoBase.cpp')
-rw-r--r-- | widget/GfxInfoBase.cpp | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/widget/GfxInfoBase.cpp b/widget/GfxInfoBase.cpp index 3e32ffbe15..251b46ce66 100644 --- a/widget/GfxInfoBase.cpp +++ b/widget/GfxInfoBase.cpp @@ -279,6 +279,12 @@ static const char* GetPrefNameForFeature(int32_t aFeature) { case nsIGfxInfo::FEATURE_WEBGL_USE_HARDWARE: name = BLOCKLIST_PREF_BRANCH "webgl-use-hardware"; break; + case nsIGfxInfo::FEATURE_OVERLAY_VP_AUTO_HDR: + name = BLOCKLIST_PREF_BRANCH "overlay-vp-auto-hdr"; + break; + case nsIGfxInfo::FEATURE_OVERLAY_VP_SUPER_RESOLUTION: + name = BLOCKLIST_PREF_BRANCH "overlay-vp-super-resolution"; + break; default: MOZ_ASSERT_UNREACHABLE("Unexpected nsIGfxInfo feature?!"); break; @@ -555,6 +561,12 @@ static int32_t BlocklistFeatureToGfxFeature(const nsAString& aFeature) { if (aFeature.EqualsLiteral("ACCELERATED_CANVAS2D")) { return nsIGfxInfo::FEATURE_ACCELERATED_CANVAS2D; } + if (aFeature.EqualsLiteral("FEATURE_OVERLAY_VP_AUTO_HDR")) { + return nsIGfxInfo::FEATURE_OVERLAY_VP_AUTO_HDR; + } + if (aFeature.EqualsLiteral("FEATURE_OVERLAY_VP_SUPER_RESOLUTION")) { + return nsIGfxInfo::FEATURE_OVERLAY_VP_SUPER_RESOLUTION; + } if (aFeature.EqualsLiteral("ALL")) { return GfxDriverInfo::allFeatures; } @@ -1276,8 +1288,7 @@ bool GfxInfoBase::DoesDriverVendorMatch(const nsAString& aBlocklistVendor, } bool GfxInfoBase::IsFeatureAllowlisted(int32_t aFeature) const { - return aFeature == nsIGfxInfo::FEATURE_VIDEO_OVERLAY || - aFeature == nsIGfxInfo::FEATURE_HW_DECODED_VIDEO_ZERO_COPY; + return aFeature == nsIGfxInfo::FEATURE_HW_DECODED_VIDEO_ZERO_COPY; } nsresult GfxInfoBase::GetFeatureStatusImpl( @@ -1925,7 +1936,7 @@ using Device = nsIGfxInfo::FontVisibilityDeviceDetermination; static StaticAutoPtr<std::pair<Device, nsString>> ret; std::pair<Device, nsString>* GfxInfoBase::GetFontVisibilityDeterminationPair() { - if(!ret) { + if (!ret) { ret = new std::pair<Device, nsString>(); ret->first = Device::Unassigned; ret->second = u""_ns; @@ -2150,6 +2161,18 @@ GfxInfoBase::GetUsingGPUProcess(bool* aOutValue) { return NS_OK; } +NS_IMETHODIMP +GfxInfoBase::GetUsingRemoteCanvas(bool* aOutValue) { + *aOutValue = gfx::gfxVars::RemoteCanvasEnabled(); + return NS_OK; +} + +NS_IMETHODIMP +GfxInfoBase::GetUsingAcceleratedCanvas(bool* aOutValue) { + *aOutValue = gfx::gfxVars::UseAcceleratedCanvas2D(); + return NS_OK; +} + NS_IMETHODIMP_(int32_t) GfxInfoBase::GetMaxRefreshRate(bool* aMixed) { if (aMixed) { |