aboutsummaryrefslogtreecommitdiff
path: root/devel/electron29/files/patch-ui_gfx_mojom_native__handle__types__mojom__traits.cc
diff options
context:
space:
mode:
Diffstat (limited to 'devel/electron29/files/patch-ui_gfx_mojom_native__handle__types__mojom__traits.cc')
-rw-r--r--devel/electron29/files/patch-ui_gfx_mojom_native__handle__types__mojom__traits.cc34
1 files changed, 34 insertions, 0 deletions
diff --git a/devel/electron29/files/patch-ui_gfx_mojom_native__handle__types__mojom__traits.cc b/devel/electron29/files/patch-ui_gfx_mojom_native__handle__types__mojom__traits.cc
new file mode 100644
index 000000000000..727ef6cd5c14
--- /dev/null
+++ b/devel/electron29/files/patch-ui_gfx_mojom_native__handle__types__mojom__traits.cc
@@ -0,0 +1,34 @@
+--- ui/gfx/mojom/native_handle_types_mojom_traits.cc.orig 2023-02-01 18:43:52 UTC
++++ ui/gfx/mojom/native_handle_types_mojom_traits.cc
+@@ -8,11 +8,11 @@
+
+ namespace mojo {
+
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OZONE)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_OZONE) || BUILDFLAG(IS_BSD)
+ mojo::PlatformHandle StructTraits<
+ gfx::mojom::NativePixmapPlaneDataView,
+ gfx::NativePixmapPlane>::buffer_handle(gfx::NativePixmapPlane& plane) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ return mojo::PlatformHandle(std::move(plane.fd));
+ #elif BUILDFLAG(IS_FUCHSIA)
+ return mojo::PlatformHandle(std::move(plane.vmo));
+@@ -28,7 +28,7 @@ bool StructTraits<
+ out->size = data.size();
+
+ mojo::PlatformHandle handle = data.TakeBufferHandle();
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ if (!handle.is_fd())
+ return false;
+ out->fd = handle.TakeFD();
+@@ -54,7 +54,7 @@ bool StructTraits<
+ gfx::mojom::NativePixmapHandleDataView,
+ gfx::NativePixmapHandle>::Read(gfx::mojom::NativePixmapHandleDataView data,
+ gfx::NativePixmapHandle* out) {
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ out->modifier = data.modifier();
+ out->supports_zero_copy_webgpu_import =
+ data.supports_zero_copy_webgpu_import();