mirror of
https://git.freebsd.org/ports.git
synced 2025-06-10 23:30:29 -04:00
Changelog: https://chromium.googlesource.com/chromium/src/+log/75.0.3770.142..76.0.3809.100?pretty=fuller&n=10000 Submitted by: Matthias Wolf <matthias@rheinwolf.de> MFH: 2019Q3
83 lines
3.1 KiB
C++
83 lines
3.1 KiB
C++
--- gpu/ipc/service/gpu_init.cc.orig 2019-07-24 18:58:27 UTC
|
|
+++ gpu/ipc/service/gpu_init.cc
|
|
@@ -107,7 +107,7 @@ void InitializePlatformOverlaySettings(GPUInfo* gpu_in
|
|
#endif
|
|
}
|
|
|
|
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(IS_CHROMECAST)
|
|
+#if (defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(IS_CHROMECAST)) || defined(OS_BSD)
|
|
bool CanAccessNvidiaDeviceFile() {
|
|
bool res = true;
|
|
base::ScopedBlockingCall scoped_blocking_call(FROM_HERE,
|
|
@@ -118,7 +118,7 @@ bool CanAccessNvidiaDeviceFile() {
|
|
}
|
|
return res;
|
|
}
|
|
-#endif // OS_LINUX && !OS_CHROMEOS && !IS_CHROMECAST
|
|
+#endif // (OS_LINUX && !OS_CHROMEOS && !IS_CHROMECAST) || OS_BSD
|
|
|
|
} // namespace
|
|
|
|
@@ -150,7 +150,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL
|
|
// crash during feature collection.
|
|
gpu::SetKeysForCrashLogging(gpu_info_);
|
|
|
|
-#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_.gpu.driver_vendor == "NVIDIA" && !CanAccessNvidiaDeviceFile())
|
|
return false;
|
|
@@ -220,7 +220,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.
|
|
@@ -229,7 +229,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL
|
|
watchdog_thread_.get(), &gpu_info_, gpu_preferences_);
|
|
attempted_startsandbox = true;
|
|
}
|
|
-#endif // defined(OS_LINUX)
|
|
+#endif // defined(OS_LINUX) && !defined(OS_BSD)
|
|
|
|
base::TimeTicks before_initialize_one_off = base::TimeTicks::Now();
|
|
|
|
@@ -328,7 +328,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL
|
|
|
|
InitializePlatformOverlaySettings(&gpu_info_);
|
|
|
|
-#if defined(OS_LINUX)
|
|
+#if defined(OS_LINUX) || defined(OS_BSD)
|
|
// Driver may create a compatibility profile context when collect graphics
|
|
// information on Linux platform. Try to collect graphics information
|
|
// based on core profile context after disabling platform extensions.
|
|
@@ -350,7 +350,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL
|
|
}
|
|
}
|
|
}
|
|
-#endif // defined(OS_LINUX)
|
|
+#endif // defined(OS_LINUX) || defined(OS_BSD)
|
|
|
|
if (use_swiftshader) {
|
|
AdjustInfoToSwiftShader();
|
|
@@ -516,7 +516,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c
|
|
|
|
InitializePlatformOverlaySettings(&gpu_info_);
|
|
|
|
-#if defined(OS_LINUX)
|
|
+#if defined(OS_LINUX) || defined(OS_BSD)
|
|
// Driver may create a compatibility profile context when collect graphics
|
|
// information on Linux platform. Try to collect graphics information
|
|
// based on core profile context after disabling platform extensions.
|
|
@@ -536,7 +536,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c
|
|
}
|
|
}
|
|
}
|
|
-#endif // defined(OS_LINUX)
|
|
+#endif // defined(OS_LINUX) || defined(OS_BSD)
|
|
|
|
if (use_swiftshader) {
|
|
AdjustInfoToSwiftShader();
|