| 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 84cfed33ef9a375cc8cecaac53287d5e2dd17369..0bfa651cbe006f3da6c3cb703140cc90370a8d32 100644
|
| --- a/content/browser/gpu/gpu_data_manager_impl_private.cc
|
| +++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
|
| @@ -932,6 +932,16 @@ void GpuDataManagerImplPrivate::HandleGpuSwitch() {
|
|
|
| bool GpuDataManagerImplPrivate::UpdateActiveGpu(uint32_t vendor_id,
|
| uint32_t device_id) {
|
| + const base::CommandLine* command_line =
|
| + base::CommandLine::ForCurrentProcess();
|
| +
|
| + // For tests, only the gpu process is allowed to detect the active gpu device
|
| + // using information on the actual loaded GL driver.
|
| + if (command_line->HasSwitch(switches::kGpuTestingVendorId) &&
|
| + command_line->HasSwitch(switches::kGpuTestingDeviceId)) {
|
| + return false;
|
| + }
|
| +
|
| if (gpu_info_.gpu.vendor_id == vendor_id &&
|
| gpu_info_.gpu.device_id == device_id) {
|
| // The primary GPU is active.
|
|
|