Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: content/gpu/gpu_main.cc

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
Patch Set: Added use_testing_switches param to ParseSecondaryGpuDevicesFromCommandLine and added IdentifyActiv… Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698