mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 04:41:11 +00:00
Bug 1758156 - Check the pref when creating PWebGPU parent actors. r=aosmond a=pascalc
Differential Revision: https://phabricator.services.mozilla.com/D140539
This commit is contained in:
parent
eb868507e2
commit
bd8cf93679
@ -15,6 +15,7 @@
|
||||
# include "mozilla/gfx/DeviceManagerDx.h" // for DeviceManagerDx
|
||||
# include "mozilla/layers/ImageDataSerializer.h"
|
||||
#endif
|
||||
#include "mozilla/StaticPrefs_dom.h"
|
||||
#include "mozilla/dom/WebGLParent.h"
|
||||
#include "mozilla/ipc/Transport.h" // for Transport
|
||||
#include "mozilla/layers/AnimationHelper.h" // for CompositorAnimationStorage
|
||||
@ -270,6 +271,10 @@ bool ContentCompositorBridgeParent::DeallocPWebRenderBridgeParent(
|
||||
}
|
||||
|
||||
webgpu::PWebGPUParent* ContentCompositorBridgeParent::AllocPWebGPUParent() {
|
||||
if (!StaticPrefs::dom_webgpu_enabled()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
webgpu::WebGPUParent* parent = new webgpu::WebGPUParent();
|
||||
parent->AddRef(); // IPDL reference
|
||||
return parent;
|
||||
|
Loading…
Reference in New Issue
Block a user