[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor-browser] 115/311: Bug 1758156 - Check that the webgpu pref is enabled when creating PWebGPUParent. r=aosmond a=pascalc
This is an automated email from the git hooks/post-receive script.
pierov pushed a commit to branch geckoview-99.0.1-11.0-1
in repository tor-browser.
commit 7c91e936c55998b755ef34f979d0935dd8d2ddcc
Author: Nicolas Silva <nsilva@xxxxxxxxxxx>
AuthorDate: Thu Mar 10 10:32:34 2022 +0000
Bug 1758156 - Check that the webgpu pref is enabled when creating PWebGPUParent. r=aosmond a=pascalc
A better solution would check against the same value as reported by gfxConfig, which takes the pref as well as whether webgpu was blocked (for example due to buggy drivers) into account, but this still is good sanity check and easy to uplift.
Differential Revision: https://phabricator.services.mozilla.com/D140535
---
gfx/ipc/CanvasManagerParent.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/gfx/ipc/CanvasManagerParent.cpp b/gfx/ipc/CanvasManagerParent.cpp
index b0211091094d4..78af873b014db 100644
--- a/gfx/ipc/CanvasManagerParent.cpp
+++ b/gfx/ipc/CanvasManagerParent.cpp
@@ -5,6 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "CanvasManagerParent.h"
+#include "mozilla/StaticPrefs_dom.h"
#include "mozilla/dom/WebGLParent.h"
#include "mozilla/gfx/gfxVars.h"
#include "mozilla/ipc/Endpoint.h"
@@ -90,6 +91,10 @@ already_AddRefed<dom::PWebGLParent> CanvasManagerParent::AllocPWebGLParent() {
already_AddRefed<webgpu::PWebGPUParent>
CanvasManagerParent::AllocPWebGPUParent() {
+ if (!StaticPrefs::dom_webgpu_enabled()) {
+ return nullptr;
+ }
+
return MakeAndAddRef<webgpu::WebGPUParent>();
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits