diff options
Diffstat (limited to 'devel/electron38/files/patch-content_gpu_gpu__main.cc')
| -rw-r--r-- | devel/electron38/files/patch-content_gpu_gpu__main.cc | 73 | 
1 files changed, 73 insertions, 0 deletions
| diff --git a/devel/electron38/files/patch-content_gpu_gpu__main.cc b/devel/electron38/files/patch-content_gpu_gpu__main.cc new file mode 100644 index 000000000000..d8d2b2a74cf0 --- /dev/null +++ b/devel/electron38/files/patch-content_gpu_gpu__main.cc @@ -0,0 +1,73 @@ +--- content/gpu/gpu_main.cc.orig	2025-09-10 14:33:47 UTC ++++ content/gpu/gpu_main.cc +@@ -107,10 +107,14 @@ + #include "sandbox/win/src/sandbox.h" + #endif +  +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #include "content/child/sandboxed_process_thread_type_handler.h" + #include "content/common/gpu_pre_sandbox_hook_linux.h" ++#if BUILDFLAG(IS_BSD) ++#include "sandbox/policy/sandbox.h" ++#else + #include "sandbox/policy/linux/sandbox_linux.h" ++#endif + #include "sandbox/policy/sandbox_type.h" + #endif +  +@@ -128,7 +132,7 @@ namespace { +  + namespace { +  +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + bool StartSandboxLinux(gpu::GpuWatchdogThread*, +                        const gpu::GPUInfo*, +                        const gpu::GpuPreferences&); +@@ -190,7 +194,7 @@ class ContentSandboxHelper : public gpu::GpuSandboxHel +                                 const gpu::GPUInfo* gpu_info, +                                 const gpu::GpuPreferences& gpu_prefs) override { +     TRACE_EVENT("gpu,startup", "gpu_main::EnsureSandboxInitialized"); +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) +     return StartSandboxLinux(watchdog_thread, gpu_info, gpu_prefs); + #elif BUILDFLAG(IS_WIN) +     return StartSandboxWindows(sandbox_info_); +@@ -310,7 +314,7 @@ int GpuMain(MainFunctionParams parameters) { +           std::make_unique<base::SingleThreadTaskExecutor>( +               gpu_preferences.message_pump_type); +     } +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + #error "Unsupported Linux platform." + #elif BUILDFLAG(IS_MAC) +     // Cross-process CoreAnimation requires a CFRunLoop to function at all, and +@@ -335,7 +339,8 @@ int GpuMain(MainFunctionParams parameters) { +   base::PlatformThread::SetName("CrGpuMain"); +   mojo::InterfaceEndpointClient::SetThreadNameSuffixForMetrics("GpuMain"); +  +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++// XXX BSD ++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_BSD) +   // Thread type delegate of the process should be registered before +   // thread type change below for the main thread and for thread pool in +   // ChildProcess constructor. +@@ -482,7 +487,7 @@ namespace { +  + namespace { +  +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) + bool StartSandboxLinux(gpu::GpuWatchdogThread* watchdog_thread, +                        const gpu::GPUInfo* gpu_info, +                        const gpu::GpuPreferences& gpu_prefs) { +@@ -530,7 +535,7 @@ bool StartSandboxLinux(gpu::GpuWatchdogThread* watchdo +   sandbox_options.accelerated_video_encode_enabled = +       !gpu_prefs.disable_accelerated_video_encode; +  +-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) ++#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) +   // Video decoding of many video streams can use thousands of FDs as well as +   // Exo clients. +   // See https://crbug.com/1417237 | 
