aboutsummaryrefslogtreecommitdiff
path: root/devel/electron39/files/patch-media_base_video__frame.cc
diff options
context:
space:
mode:
Diffstat (limited to 'devel/electron39/files/patch-media_base_video__frame.cc')
-rw-r--r--devel/electron39/files/patch-media_base_video__frame.cc47
1 files changed, 47 insertions, 0 deletions
diff --git a/devel/electron39/files/patch-media_base_video__frame.cc b/devel/electron39/files/patch-media_base_video__frame.cc
new file mode 100644
index 000000000000..2d5bb827bc56
--- /dev/null
+++ b/devel/electron39/files/patch-media_base_video__frame.cc
@@ -0,0 +1,47 @@
+--- media/base/video_frame.cc.orig 2025-10-21 20:19:54 UTC
++++ media/base/video_frame.cc
+@@ -86,7 +86,7 @@ std::string VideoFrame::StorageTypeToString(
+ return "OWNED_MEMORY";
+ case VideoFrame::STORAGE_SHMEM:
+ return "SHMEM";
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ case VideoFrame::STORAGE_DMABUFS:
+ return "DMABUFS";
+ #endif
+@@ -100,7 +100,7 @@ bool VideoFrame::IsStorageTypeMappable(VideoFrame::Sto
+ // static
+ bool VideoFrame::IsStorageTypeMappable(VideoFrame::StorageType storage_type) {
+ return
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // This is not strictly needed but makes explicit that, at VideoFrame
+ // level, DmaBufs are not mappable from userspace.
+ storage_type != VideoFrame::STORAGE_DMABUFS &&
+@@ -395,7 +395,7 @@ scoped_refptr<VideoFrame> VideoFrame::CreateFrameForMa
+ plane_size.width() * VideoFrame::BytesPerElement(*format, plane);
+ }
+ uint64_t modifier = gfx::NativePixmapHandle::kNoModifier;
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ bool is_native_buffer = !shared_image->IsSharedMemoryForVideoFrame();
+ if (is_native_buffer) {
+ const auto gmb_handle = shared_image->CloneGpuMemoryBufferHandle();
+@@ -852,7 +852,7 @@ scoped_refptr<VideoFrame> VideoFrame::WrapExternalGpuM
+ }
+ #endif
+
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // static
+ scoped_refptr<VideoFrame> VideoFrame::WrapExternalDmabufs(
+ const VideoFrameLayout& layout,
+@@ -1539,7 +1539,7 @@ scoped_refptr<gpu::ClientSharedImage> VideoFrame::shar
+ return wrapped_frame_ ? wrapped_frame_->shared_image() : shared_image_;
+ }
+
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ size_t VideoFrame::NumDmabufFds() const {
+ if (wrapped_frame_) {
+ return wrapped_frame_->NumDmabufFds();