ports/devel/electron33/files/patch-media_base_video__frame.cc
Hiroki Tagato 9c04d144dd devel/electron33: add port: Build cross-platform desktop apps with JavaScript, HTML, and CSS
Build cross platform desktop apps with JavaScript, HTML, and CSS.

It's easier than you think.

If you can build a website, you can build a desktop app. Electron is a
framework for creating native applications with web technologies like
JavaScript, HTML, and CSS. It takes care of the hard parts so you can
focus on the core of your application.

WWW: https://www.electronjs.org/
2024-11-13 23:41:37 +09:00

47 lines
2.1 KiB
C++

--- media/base/video_frame.cc.orig 2024-10-16 21:31:33 UTC
+++ media/base/video_frame.cc
@@ -88,7 +88,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
@@ -103,7 +103,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 &&
@@ -401,7 +401,7 @@ VideoFrame::CreateFrameForGpuMemoryBufferOrMappableSII
: shared_image->GetStrideForVideoFrame(i);
}
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 =
gpu_memory_buffer
? (gpu_memory_buffer->GetType() != gfx::SHARED_MEMORY_BUFFER)
@@ -782,7 +782,7 @@ scoped_refptr<VideoFrame> VideoFrame::WrapExternalGpuM
return frame;
}
-#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,
@@ -1489,7 +1489,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();