[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-browser/geckoview-96.0-11.0-1] Bug 1758156 - Check the pref when creating PWebGPU parent actors. r=aosmond a=pascalc



commit d7efc93e7eabe63ca5381fb07a1786e2d55e69c6
Author: Nicolas Silva <nsilva@xxxxxxxxxxx>
Date:   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 9b3a641ad0e6..03f5e68cd241 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;
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits