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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user