$OpenBSD: patch-gpu_ipc_service_gpu_init_cc,v 1.3 2017/12/04 13:55:42 robert Exp $

Index: gpu/ipc/service/gpu_init.cc
--- gpu/ipc/service/gpu_init.cc.orig
+++ gpu/ipc/service/gpu_init.cc
@@ -82,7 +82,7 @@ void CollectGraphicsInfo(GPUInfo* gpu_info) {
 }
 #endif  // defined(OS_MACOSX)
 
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_BSD)
 bool CanAccessNvidiaDeviceFile() {
   bool res = true;
   base::ThreadRestrictions::AssertIOAllowed();
@@ -117,7 +117,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL
   // passing from browser process.
   GetGpuInfoFromCommandLine(*command_line, &gpu_info_);
 #endif  // OS_ANDROID
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_BSD)
   if (gpu_info_.gpu.vendor_id == 0x10de &&  // NVIDIA
       gpu_info_.driver_vendor == "NVIDIA" && !CanAccessNvidiaDeviceFile())
     return false;
@@ -175,7 +175,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL
   sandbox_helper_->PreSandboxStartup();
 
   bool attempted_startsandbox = false;
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
   // On Chrome OS ARM Mali, GPU driver userspace creates threads when
   // initializing a GL context, so start the sandbox early.
   // TODO(zmo): Need to collect OS version before this.
