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

Unified Diff: gpu/config/gpu_info_collector_win.cc

Issue 332843003: Use the updated AMD switchable info collection code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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/gpu_info_collector.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/config/gpu_info_collector_win.cc
diff --git a/gpu/config/gpu_info_collector_win.cc b/gpu/config/gpu_info_collector_win.cc
index 556842c3e8ec1a49977fa5fd791f9fd36b676843..65d75ec91a1c3ee78c255da2a57eed4c4e541144 100644
--- a/gpu/config/gpu_info_collector_win.cc
+++ b/gpu/config/gpu_info_collector_win.cc
@@ -363,13 +363,14 @@ void CollectD3D11Support() {
} // namespace anonymous
#if !defined(GOOGLE_CHROME_BUILD)
-AMDVideoCardType GetAMDVideocardType() {
- return STANDALONE;
+void GetAMDVideocardInfo(GPUInfo* gpu_info) {
+ DCHECK(gpu_info);
+ return;
}
#else
// This function has a real implementation for official builds that can
// be found in src/third_party/amd.
-AMDVideoCardType GetAMDVideocardType();
+void GetAMDVideocardInfo(GPUInfo* gpu_info);
#endif
bool CollectDriverInfoD3D(const std::wstring& device_id,
@@ -433,9 +434,14 @@ bool CollectDriverInfoD3D(const std::wstring& device_id,
// signal the videocard is assumed to be switchable. Additionally,
// some switchable systems with Intel GPUs aren't correctly
// detected, so always count them.
- AMDVideoCardType amd_card_type = GetAMDVideocardType();
- gpu_info->amd_switchable = (gpu_info->gpu.vendor_id == 0x8086) ||
- (amd_card_type != STANDALONE);
+ GetAMDVideocardInfo(gpu_info);
+ if (!gpu_info->amd_switchable &&
+ gpu_info->gpu.vendor_id == 0x8086) {
+ gpu_info->amd_switchable = true;
+ gpu_info->secondary_gpus.push_back(gpu_info->gpu);
+ gpu_info->gpu.vendor_id = 0x1002;
+ gpu_info->gpu.device_id = 0; // Unknown discrete AMD GPU.
+ }
}
}
« no previous file with comments | « gpu/config/gpu_info_collector.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698