 Chromium Code Reviews
 Chromium Code Reviews Issue 1874643003:
  Do not lose secondary gpus and make sure to have an active gpu on multiple gpu configurations  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master
    
  
    Issue 1874643003:
  Do not lose secondary gpus and make sure to have an active gpu on multiple gpu configurations  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master| OLD | NEW | 
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #include <stddef.h> | 5 #include <stddef.h> | 
| 6 #include <stdlib.h> | 6 #include <stdlib.h> | 
| 7 | 7 | 
| 8 #include <memory> | 8 #include <memory> | 
| 9 #include <utility> | 9 #include <utility> | 
| 10 | 10 | 
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 435 &gpu_info.gpu.vendor_id); | 435 &gpu_info.gpu.vendor_id); | 
| 436 DCHECK(success); | 436 DCHECK(success); | 
| 437 success = base::HexStringToUInt( | 437 success = base::HexStringToUInt( | 
| 438 command_line.GetSwitchValueASCII(switches::kGpuDeviceID), | 438 command_line.GetSwitchValueASCII(switches::kGpuDeviceID), | 
| 439 &gpu_info.gpu.device_id); | 439 &gpu_info.gpu.device_id); | 
| 440 DCHECK(success); | 440 DCHECK(success); | 
| 441 gpu_info.driver_vendor = | 441 gpu_info.driver_vendor = | 
| 442 command_line.GetSwitchValueASCII(switches::kGpuDriverVendor); | 442 command_line.GetSwitchValueASCII(switches::kGpuDriverVendor); | 
| 443 gpu_info.driver_version = | 443 gpu_info.driver_version = | 
| 444 command_line.GetSwitchValueASCII(switches::kGpuDriverVersion); | 444 command_line.GetSwitchValueASCII(switches::kGpuDriverVersion); | 
| 445 gpu_info.gpu.active = true; | |
| 
Zhenyao Mo
2016/04/19 21:05:27
Why assume the primary GPU is active? Wouldn't thi
 
Julien Isorce Samsung
2016/04/20 17:19:21
You are right. When there is least one secondary g
 | |
| 446 gpu::ParseSecondaryGpuDevicesFromCommandLine( | |
| 447 command_line, switches::kGpuSecondaryVendorIDs, | |
| 448 switches::kGpuSecondaryDeviceIDs, &gpu_info); | |
| 449 | |
| 445 GetContentClient()->SetGpuInfo(gpu_info); | 450 GetContentClient()->SetGpuInfo(gpu_info); | 
| 446 } | 451 } | 
| 447 | 452 | 
| 448 bool WarmUpSandbox(const base::CommandLine& command_line) { | 453 bool WarmUpSandbox(const base::CommandLine& command_line) { | 
| 449 { | 454 { | 
| 450 TRACE_EVENT0("gpu", "Warm up rand"); | 455 TRACE_EVENT0("gpu", "Warm up rand"); | 
| 451 // Warm up the random subsystem, which needs to be done pre-sandbox on all | 456 // Warm up the random subsystem, which needs to be done pre-sandbox on all | 
| 452 // platforms. | 457 // platforms. | 
| 453 (void) base::RandUint64(); | 458 (void) base::RandUint64(); | 
| 454 } | 459 } | 
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 585 return true; | 590 return true; | 
| 586 } | 591 } | 
| 587 | 592 | 
| 588 return false; | 593 return false; | 
| 589 } | 594 } | 
| 590 #endif // defined(OS_WIN) | 595 #endif // defined(OS_WIN) | 
| 591 | 596 | 
| 592 } // namespace. | 597 } // namespace. | 
| 593 | 598 | 
| 594 } // namespace content | 599 } // namespace content | 
| OLD | NEW |