ports/devel/electron4/files/patch-content_gpu_gpu__main.cc
Luca Pizzamiglio 2f40d531c4 devel/electron4: Add electron 4.2.2
Finally, after a long wait, an electron port for FreeBSD lands in the
portstree.

A huge thanks to everyone contributed to this huge effort and to the
maintainer that is willing to take the burden of the maintainership!
2019-05-28 09:12:02 +00:00

47 lines
1.7 KiB
C++

--- content/gpu/gpu_main.cc.orig 2019-03-16 09:15:21 UTC
+++ content/gpu/gpu_main.cc
@@ -77,7 +77,7 @@
#include "ui/gfx/x/x11_switches.h" // nogncheck
#endif
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
#include "content/gpu/gpu_sandbox_hook_linux.h"
#include "content/public/common/sandbox_init.h"
#include "services/service_manager/sandbox/linux/sandbox_linux.h"
@@ -110,7 +110,7 @@ namespace content {
namespace {
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) && !defined(OS_BSD)
bool StartSandboxLinux(gpu::GpuWatchdogThread*,
const gpu::GPUInfo*,
const gpu::GpuPreferences&);
@@ -171,7 +171,7 @@ class ContentSandboxHelper : public gpu::GpuSandboxHel
bool EnsureSandboxInitialized(gpu::GpuWatchdogThread* watchdog_thread,
const gpu::GPUInfo* gpu_info,
const gpu::GpuPreferences& gpu_prefs) override {
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) && !defined(OS_BSD)
return StartSandboxLinux(watchdog_thread, gpu_info, gpu_prefs);
#elif defined(OS_WIN)
return StartSandboxWindows(sandbox_info_);
@@ -355,7 +355,7 @@ int GpuMain(const MainFunctionParams& parameters) {
namespace {
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) && !defined(OS_BSD)
bool StartSandboxLinux(gpu::GpuWatchdogThread* watchdog_thread,
const gpu::GPUInfo* gpu_info,
const gpu::GpuPreferences& gpu_prefs) {
@@ -390,7 +390,7 @@ bool StartSandboxLinux(gpu::GpuWatchdogThread* watchdo
return res;
}
-#endif // defined(OS_LINUX)
+#endif // defined(OS_LINUX) && !defined(OS_BSD)
#if defined(OS_WIN)
bool StartSandboxWindows(const sandbox::SandboxInterfaceInfo* sandbox_info) {