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

Unified Diff: gpu/config/gpu_info_collector.cc

Issue 2765593002: gpu/config: Use angle::GetSystemInfo on Mac (Closed)
Patch Set: gpu/config: Use angle::GetSystemInfo on Mac Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/config/BUILD.gn ('k') | gpu/config/gpu_info_collector_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/config/gpu_info_collector.cc
diff --git a/gpu/config/gpu_info_collector.cc b/gpu/config/gpu_info_collector.cc
index 6f8068ea9dcc63579d04cbb1f3e68d856a76e195..5a7768510becb7d17e237d8c0a54daa2cd234dac 100644
--- a/gpu/config/gpu_info_collector.cc
+++ b/gpu/config/gpu_info_collector.cc
@@ -307,11 +307,16 @@ void IdentifyActiveGPU(GPUInfo* gpu_info) {
void FillGPUInfoFromSystemInfo(GPUInfo* gpu_info,
angle::SystemInfo* system_info) {
+ DCHECK(system_info->primaryGPUIndex >= 0);
+
angle::GPUDeviceInfo* primary =
&system_info->gpus[system_info->primaryGPUIndex];
gpu_info->gpu.vendor_id = primary->vendorId;
gpu_info->gpu.device_id = primary->deviceId;
+ if (system_info->primaryGPUIndex == system_info->activeGPUIndex) {
+ gpu_info->gpu.active = true;
+ }
gpu_info->driver_vendor = std::move(primary->driverVendor);
gpu_info->driver_version = std::move(primary->driverVersion);
@@ -325,6 +330,9 @@ void FillGPUInfoFromSystemInfo(GPUInfo* gpu_info,
GPUInfo::GPUDevice device;
device.vendor_id = system_info->gpus[i].vendorId;
device.device_id = system_info->gpus[i].deviceId;
+ if (static_cast<int>(i) == system_info->activeGPUIndex) {
+ device.active = true;
+ }
gpu_info->secondary_gpus.push_back(device);
}
« no previous file with comments | « gpu/config/BUILD.gn ('k') | gpu/config/gpu_info_collector_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698