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::ParseSecondaryGpuDevicesFromCommandLine(command_line, false, &gpu_info); | |
446 if (gpu_info.secondary_gpus.size() == 0) | |
447 gpu_info.gpu.active = true; | |
Zhenyao Mo
2016/04/21 17:03:37
This is better, but still doesn't address the prob
Julien Isorce Samsung
2016/04/21 23:27:08
Done, I added kGpuActiveDeviceID.
| |
448 | |
445 GetContentClient()->SetGpuInfo(gpu_info); | 449 GetContentClient()->SetGpuInfo(gpu_info); |
446 } | 450 } |
447 | 451 |
448 bool WarmUpSandbox(const base::CommandLine& command_line) { | 452 bool WarmUpSandbox(const base::CommandLine& command_line) { |
449 { | 453 { |
450 TRACE_EVENT0("gpu", "Warm up rand"); | 454 TRACE_EVENT0("gpu", "Warm up rand"); |
451 // Warm up the random subsystem, which needs to be done pre-sandbox on all | 455 // Warm up the random subsystem, which needs to be done pre-sandbox on all |
452 // platforms. | 456 // platforms. |
453 (void) base::RandUint64(); | 457 (void) base::RandUint64(); |
454 } | 458 } |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
585 return true; | 589 return true; |
586 } | 590 } |
587 | 591 |
588 return false; | 592 return false; |
589 } | 593 } |
590 #endif // defined(OS_WIN) | 594 #endif // defined(OS_WIN) |
591 | 595 |
592 } // namespace. | 596 } // namespace. |
593 | 597 |
594 } // namespace content | 598 } // namespace content |
OLD | NEW |