diff options
Diffstat (limited to 'www/chromium/files/patch-gpu_ipc_service_gpu__init.cc')
-rw-r--r-- | www/chromium/files/patch-gpu_ipc_service_gpu__init.cc | 78 |
1 files changed, 12 insertions, 66 deletions
diff --git a/www/chromium/files/patch-gpu_ipc_service_gpu__init.cc b/www/chromium/files/patch-gpu_ipc_service_gpu__init.cc index 06b90f4eef76..bd779592117a 100644 --- a/www/chromium/files/patch-gpu_ipc_service_gpu__init.cc +++ b/www/chromium/files/patch-gpu_ipc_service_gpu__init.cc @@ -1,33 +1,24 @@ ---- gpu/ipc/service/gpu_init.cc.orig 2021-12-31 00:57:34 UTC +--- gpu/ipc/service/gpu_init.cc.orig 2022-02-07 13:39:41 UTC +++ gpu/ipc/service/gpu_init.cc -@@ -123,7 +123,7 @@ void InitializePlatformOverlaySettings(GPUInfo* gpu_in +@@ -122,7 +122,7 @@ void InitializePlatformOverlaySettings(GPUInfo* gpu_in } #if BUILDFLAG(IS_CHROMEOS_LACROS) || \ - (defined(OS_LINUX) && !BUILDFLAG(IS_CHROMECAST)) -+ (defined(OS_LINUX) && !BUILDFLAG(IS_CHROMECAST)) || defined(OS_BSD) ++ (defined(OS_LINUX) && !BUILDFLAG(IS_CHROMECAST)) && !defined(OS_BSD) bool CanAccessNvidiaDeviceFile() { bool res = true; base::ScopedBlockingCall scoped_blocking_call(FROM_HERE, -@@ -134,7 +134,7 @@ bool CanAccessNvidiaDeviceFile() { - } - return res; - } --#endif // BUILDFLAG(IS_CHROMEOS_LACROS) || (defined(OS_LINUX) && -+#endif // BUILDFLAG(IS_CHROMEOS_LACROS) || defined(OS_BSD) || (defined(OS_LINUX) && - // !BUILDFLAG(IS_CHROMECAST)) - - class GpuWatchdogInit { -@@ -221,7 +221,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -220,7 +220,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL device_perf_info_ = device_perf_info; } -#if defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) -+#if defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || defined(OS_BSD) ++#if defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) && !defined(OS_BSD) if (gpu_info_.gpu.vendor_id == 0x10de && // NVIDIA gpu_info_.gpu.driver_vendor == "NVIDIA" && !CanAccessNvidiaDeviceFile()) return false; -@@ -285,7 +285,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -284,7 +284,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL delayed_watchdog_enable = true; #endif @@ -36,7 +27,7 @@ // PreSandbox is mainly for resource handling and not related to the GPU // driver, it doesn't need the GPU watchdog. The loadLibrary may take long // time that killing and restarting the GPU process will not help. -@@ -325,7 +325,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -324,7 +324,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL } bool attempted_startsandbox = false; @@ -45,16 +36,7 @@ // 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. -@@ -334,7 +334,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL - watchdog_thread_.get(), &gpu_info_, gpu_preferences_); - attempted_startsandbox = true; - } --#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) -+#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) - - base::TimeTicks before_initialize_one_off = base::TimeTicks::Now(); - -@@ -376,7 +376,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -373,7 +373,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL } if (gl_initialized && gl_use_swiftshader_ && !gl::IsSoftwareGLImplementation(gl::GetGLImplementationParts())) { @@ -63,16 +45,7 @@ VLOG(1) << "Quit GPU process launch to fallback to SwiftShader cleanly " << "on Linux"; return false; -@@ -384,7 +384,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL - SaveHardwareGpuInfoAndGpuFeatureInfo(); - gl::init::ShutdownGL(true); - gl_initialized = false; --#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) -+#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) - } - - if (!gl_initialized) { -@@ -410,7 +410,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -407,7 +407,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL } } @@ -81,7 +54,7 @@ // The ContentSandboxHelper is currently the only one implementation of // GpuSandboxHelper and it has no dependency. Except on Linux where // VaapiWrapper checks the GL implementation to determine which display -@@ -477,7 +477,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -474,7 +474,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL command_line, gpu_feature_info_, gpu_preferences_.disable_software_rasterizer, false); if (gl_use_swiftshader_) { @@ -90,16 +63,7 @@ VLOG(1) << "Quit GPU process launch to fallback to SwiftShader cleanly " << "on Linux"; return false; -@@ -492,7 +492,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL - << "failed"; - return false; - } --#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) -+#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) - } - } else { // gl_use_swiftshader_ == true - switch (gpu_preferences_.use_vulkan) { -@@ -568,7 +568,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL +@@ -575,7 +575,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL InitializePlatformOverlaySettings(&gpu_info_, gpu_feature_info_); @@ -108,16 +72,7 @@ // 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. -@@ -587,7 +587,7 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandL - return false; - } - } --#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) -+#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) - - if (gl_use_swiftshader_) { - AdjustInfoToSwiftShader(); -@@ -810,7 +810,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c +@@ -813,7 +813,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c InitializePlatformOverlaySettings(&gpu_info_, gpu_feature_info_); @@ -126,12 +81,3 @@ // 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. -@@ -831,7 +831,7 @@ void GpuInit::InitializeInProcess(base::CommandLine* c - } - } - } --#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) -+#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) - - if (gl_use_swiftshader_) { - AdjustInfoToSwiftShader(); |