Index: gpu/ipc/service/gpu_init.cc |
diff --git a/gpu/ipc/service/gpu_init.cc b/gpu/ipc/service/gpu_init.cc |
index 2af73234148c4563f40ca4559d185e4fa96d9352..ba4bc8b864bb57d7bb322cd33e33d51e605bd06f 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,11 +161,15 @@ 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(); |
+ } |
#endif // defined(OS_LINUX) |
base::TimeTicks before_initialize_one_off = base::TimeTicks::Now(); |
@@ -203,7 +208,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) |