summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gpu/config/gpu_info_collector.h2
-rw-r--r--gpu/config/gpu_info_collector_win.cc18
2 files changed, 6 insertions, 14 deletions
diff --git a/gpu/config/gpu_info_collector.h b/gpu/config/gpu_info_collector.h
index f16071b..f3d339e 100644
--- a/gpu/config/gpu_info_collector.h
+++ b/gpu/config/gpu_info_collector.h
@@ -66,8 +66,6 @@ GPU_EXPORT void MergeGPUInfoGL(GPUInfo* basic_gpu_info,
// Advanced Micro Devices has interesting configurations on laptops were
// there are two videocards that can alternatively a given process output.
-// TODO(zmo): remove them when we remove the GetAMDVideocardType() in the
-// internal src/third_party/amd.
enum AMDVideoCardType {
UNKNOWN,
STANDALONE,
diff --git a/gpu/config/gpu_info_collector_win.cc b/gpu/config/gpu_info_collector_win.cc
index 65d75ec..556842c 100644
--- a/gpu/config/gpu_info_collector_win.cc
+++ b/gpu/config/gpu_info_collector_win.cc
@@ -363,14 +363,13 @@ void CollectD3D11Support() {
} // namespace anonymous
#if !defined(GOOGLE_CHROME_BUILD)
-void GetAMDVideocardInfo(GPUInfo* gpu_info) {
- DCHECK(gpu_info);
- return;
+AMDVideoCardType GetAMDVideocardType() {
+ return STANDALONE;
}
#else
// This function has a real implementation for official builds that can
// be found in src/third_party/amd.
-void GetAMDVideocardInfo(GPUInfo* gpu_info);
+AMDVideoCardType GetAMDVideocardType();
#endif
bool CollectDriverInfoD3D(const std::wstring& device_id,
@@ -434,14 +433,9 @@ 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.
- 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.
- }
+ AMDVideoCardType amd_card_type = GetAMDVideocardType();
+ gpu_info->amd_switchable = (gpu_info->gpu.vendor_id == 0x8086) ||
+ (amd_card_type != STANDALONE);
}
}