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) |