| Index: content/browser/gpu/gpu_data_manager_impl_private.cc
|
| diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc
|
| index a4ca614c1a8dfd1296bbc906abb4290fe8bf2c93..2690d551bd79cdfbdaeba856c5f725f017acfd2e 100644
|
| --- a/content/browser/gpu/gpu_data_manager_impl_private.cc
|
| +++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
|
| @@ -530,6 +530,21 @@ void GpuDataManagerImplPrivate::Initialize() {
|
| gpu_info.gpu.active = true;
|
| gpu_info.secondary_gpus.clear();
|
| }
|
| +
|
| + if (command_line->HasSwitch(switches::kGpuTestingSecondaryVendorId) &&
|
| + command_line->HasSwitch(switches::kGpuTestingSecondaryDeviceId)) {
|
| + gpu_info.gpu.active = false;
|
| +
|
| + gpu::GPUInfo::GPUDevice secondary_device;
|
| + secondary_device.active = false;
|
| + base::HexStringToUInt(command_line->GetSwitchValueASCII(
|
| + switches::kGpuTestingSecondaryVendorId),
|
| + &secondary_device.vendor_id);
|
| + base::HexStringToUInt(command_line->GetSwitchValueASCII(
|
| + switches::kGpuTestingSecondaryDeviceId),
|
| + &secondary_device.device_id);
|
| + gpu_info.secondary_gpus.push_back(secondary_device);
|
| + }
|
| }
|
| #if defined(ARCH_CPU_X86_FAMILY)
|
| if (!gpu_info.gpu.vendor_id || !gpu_info.gpu.device_id) {
|
| @@ -619,6 +634,10 @@ void GpuDataManagerImplPrivate::UpdateGpuInfo(const gpu::GPUInfo& gpu_info) {
|
| gpu::MergeGPUInfo(&gpu_info_, gpu_info);
|
| if (IsCompleteGpuInfoAvailable()) {
|
| complete_gpu_info_already_requested_ = true;
|
| +#if !defined(OS_MACOSX)
|
| + // Skip osx because gpu identification is done with DisplayReconfigCallback.
|
| + gpu::IdentifyActiveGPU(&gpu_info_);
|
| +#endif
|
| } else if (was_info_available) {
|
| // Allow future requests to go through properly.
|
| complete_gpu_info_already_requested_ = false;
|
| @@ -711,6 +730,9 @@ void GpuDataManagerImplPrivate::AppendGpuCommandLine(
|
| // info collection at GPU process startup, but we need gpu vendor_id,
|
| // device_id, driver_vendor, driver_version for deciding whether we need to
|
| // collect full info (on Linux) and for crash reporting purpose.
|
| + // TODO(j.isorce): http://crbug.com/547025 Passes secondary_gpus as well
|
| + // otherwise the GPU process might enable gpu driver bug workarounds for
|
| + // inactive gpus on multiple gpu configuration.
|
| command_line->AppendSwitchASCII(switches::kGpuVendorID,
|
| base::StringPrintf("0x%04x", gpu_info_.gpu.vendor_id));
|
| command_line->AppendSwitchASCII(switches::kGpuDeviceID,
|
|
|