[tor-commits] [tor-browser] 66/67: Bug 1758156 - Check the pref when creating PWebGPU parent actors. r=aosmond a=pascalc

gitolite role git at cupani.torproject.org
Wed May 4 20:45:24 UTC 2022


This is an automated email from the git hooks/post-receive script.

richard pushed a commit to branch geckoview-96.0.3-11.0-1
in repository tor-browser.

commit ae9ceadaf8ae1ae695397b35a2b006702dd7c5a6
Author: Nicolas Silva <nsilva at mozilla.com>
AuthorDate: Thu Mar 10 10:41:29 2022 +0000

    Bug 1758156 - Check the pref when creating PWebGPU parent actors. r=aosmond a=pascalc
    
    Differential Revision: https://phabricator.services.mozilla.com/D140539
---
 gfx/layers/ipc/ContentCompositorBridgeParent.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gfx/layers/ipc/ContentCompositorBridgeParent.cpp b/gfx/layers/ipc/ContentCompositorBridgeParent.cpp
index 9b3a641ad0e6f..03f5e68cd2411 100644
--- a/gfx/layers/ipc/ContentCompositorBridgeParent.cpp
+++ b/gfx/layers/ipc/ContentCompositorBridgeParent.cpp
@@ -14,6 +14,7 @@
 #  include "mozilla/gfx/DeviceManagerDx.h"  // for DeviceManagerDx
 #  include "mozilla/layers/ImageDataSerializer.h"
 #endif
+#include "mozilla/StaticPrefs_dom.h"
 #include "mozilla/ipc/Transport.h"           // for Transport
 #include "mozilla/layers/AnimationHelper.h"  // for CompositorAnimationStorage
 #include "mozilla/layers/APZCTreeManagerParent.h"  // for APZCTreeManagerParent
@@ -206,6 +207,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;

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the tor-commits mailing list