Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(197)

Unified Diff: gpu/ipc/service/gpu_init.cc

Issue 1542013005: Add a new driver bug workaround SANDBOX_START_EARLY Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/gles2_conform_support/egl/thread_state.cc ('k') | ui/gl/gl_implementation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/ipc/service/gpu_init.cc
diff --git a/gpu/ipc/service/gpu_init.cc b/gpu/ipc/service/gpu_init.cc
index 1e912037747c8dac81c404268660827e6d382f92..6ae5baae267fc4c95b0191ce279f6fb453ea4abf 100644
--- a/gpu/ipc/service/gpu_init.cc
+++ b/gpu/ipc/service/gpu_init.cc
@@ -7,6 +7,7 @@
#include "base/command_line.h"
#include "base/metrics/histogram_macros.h"
#include "base/strings/string_number_conversions.h"
+#include "base/sys_info.h"
#include "base/third_party/dynamic_annotations/dynamic_annotations.h"
#include "base/threading/thread_restrictions.h"
#include "base/trace_event/trace_event.h"
@@ -160,12 +161,16 @@ bool GpuInit::InitializeAndStartSandbox(const base::CommandLine& command_line) {
sandbox_helper_->PreSandboxStartup();
+ std::string os_version;
+
#if defined(OS_LINUX)
// On Chrome OS ARM Mali, GPU driver userspace creates threads when
// initializing a GL context, so start the sandbox early.
- if (command_line.HasSwitch(switches::kGpuSandboxStartEarly))
+ if (command_line.HasSwitch(switches::kGpuSandboxStartEarly)) {
+ os_version = base::SysInfo::OperatingSystemVersion();
gpu_info_.sandboxed =
sandbox_helper_->EnsureSandboxInitialized(watchdog_thread_.get());
+ }
#endif // defined(OS_LINUX)
base::TimeTicks before_initialize_one_off = base::TimeTicks::Now();
@@ -204,7 +209,7 @@ bool GpuInit::InitializeAndStartSandbox(const base::CommandLine& command_line) {
// initialization. However, populating GPUInfo fully works only on Android.
// Other platforms would need the bindings to query GL strings.
gpu::ApplyGpuDriverBugWorkarounds(
- gpu_info_, const_cast<base::CommandLine*>(&command_line));
+ gpu_info_, os_version, const_cast<base::CommandLine*>(&command_line));
}
#endif // !defined(OS_MACOSX)
« no previous file with comments | « gpu/gles2_conform_support/egl/thread_state.cc ('k') | ui/gl/gl_implementation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698