Index: content/gpu/gpu_main.cc |
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc |
index 6c65f5c5cdd947883983ee996f704f6e7fc2fb8f..9031a147edc010bbafade4eb1570b48095c23d5e 100644 |
--- a/content/gpu/gpu_main.cc |
+++ b/content/gpu/gpu_main.cc |
@@ -306,7 +306,8 @@ int GpuMain(const MainFunctionParams& parameters) { |
if (!CollectGraphicsInfo(gpu_info)) |
dead_on_arrival = true; |
-#if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_LINUX) |
+#if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_LINUX) || \ |
+ defined(OS_WIN) |
// Recompute gpu driver bug workarounds. |
// This is necessary on systems where vendor_id/device_id aren't available |
// (Chrome OS, Android) or where workarounds may be dependent on GL_VENDOR |
@@ -316,6 +317,12 @@ int GpuMain(const MainFunctionParams& parameters) { |
// initialized in the bindings. This should be moved before bindings |
// initialization. However, populating GPUInfo fully works only on |
// Android. Other platforms would need the bindings to query GL strings. |
+ // TODO(j.isorce): Pass secondary gpus through the command line so that |
+ // the local function GetGpuInfoFromCommandLine can generate a complete |
+ // GpuInfo. This will allow for the call CollectGraphicsInfo above to |
+ // to detect that a secondary gpu is active instead of the primary. |
+ // Then the following call will make sure to get the workarounds for the |
+ // active gpu. |
gpu::ApplyGpuDriverBugWorkarounds( |
gpu_info, const_cast<base::CommandLine*>(&command_line)); |
} |
@@ -441,6 +448,8 @@ void GetGpuInfoFromCommandLine(gpu::GPUInfo& gpu_info, |
command_line.GetSwitchValueASCII(switches::kGpuDriverVendor); |
gpu_info.driver_version = |
command_line.GetSwitchValueASCII(switches::kGpuDriverVersion); |
+ gpu_info.driver_date = |
+ command_line.GetSwitchValueASCII(switches::kGpuDriverDate); |
GetContentClient()->SetGpuInfo(gpu_info); |
} |