From 26c8862de79d12c36b2f7735ec9e51b03e201a82 Mon Sep 17 00:00:00 2001 From: "rouslan@chromium.org" Date: Fri, 13 Jun 2014 01:32:34 +0000 Subject: Revert of Use the updated AMD switchable info collection code. (https://codereview.chromium.org/332843003/) Reason for revert: The patch appears to have broken windows perf bot: http://build.chromium.org/p/chromium.perf/builders/Win%20Builder/builds/69732 Original issue's description: > Use the updated AMD switchable info collection code. > > BUG=376562 > TEST= > R=kbr@chromium.org > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=276865 TBR=kbr@chromium.org,zmo@chromium.org NOTREECHECKS=true NOTRY=true BUG=376562 Review URL: https://codereview.chromium.org/333683004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276879 0039d316-1c4b-4281-b951-d872f2087c98 --- gpu/config/gpu_info_collector.h | 2 -- gpu/config/gpu_info_collector_win.cc | 18 ++++++------------ 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); } } -- cgit v1.1