Bug 1940800: Spoof hardware support in RFP. r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D233755
This commit is contained in:
@@ -298,6 +298,13 @@ const RefPtr<SupportedLimits>& Adapter::Limits() const { return mLimits; }
|
||||
const RefPtr<AdapterInfo>& Adapter::Info() const { return mInfo; }
|
||||
|
||||
bool Adapter::IsFallbackAdapter() const {
|
||||
if (GetParentObject()->ShouldResistFingerprinting(
|
||||
RFPTarget::WebGPUIsFallbackAdapter)) {
|
||||
// Always report hardware support for WebGPU.
|
||||
// This behaviour matches with media capabilities API.
|
||||
return false;
|
||||
}
|
||||
|
||||
return mInfoInner->device_type == ffi::WGPUDeviceType::WGPUDeviceType_Cpu;
|
||||
}
|
||||
|
||||
|
||||
@@ -95,6 +95,7 @@ ITEM_VALUE(SiteSpecificZoom, 61)
|
||||
ITEM_VALUE(FontVisibilityRestrictGenerics, 62)
|
||||
ITEM_VALUE(WebVTT, 63)
|
||||
ITEM_VALUE(WebGPULimits, 64)
|
||||
ITEM_VALUE(WebGPUIsFallbackAdapter, 65)
|
||||
|
||||
// !!! Don't forget to update kDefaultFingerprintingProtections in nsRFPService.cpp
|
||||
// if necessary.
|
||||
|
||||
Reference in New Issue
Block a user