Skip to content

Commit

Permalink
Only collect information about primary display adapter on XP.
Browse files Browse the repository at this point in the history
This is much faster and the extra information wasn't useful anyway.

BUG=456178

Review URL: https://codereview.chromium.org/920263002

Cr-Commit-Position: refs/heads/master@{#316240}
  • Loading branch information
jbauman2 authored and Commit bot committed Feb 13, 2015
1 parent 750997f commit 6a723d7
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions gpu/config/gpu_info_collector_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,18 @@ CollectInfoResult CollectDriverInfoD3D(const std::wstring& device_id,
{0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18}};

// create device info for the display device
HDEVINFO device_info =
SetupDiGetClassDevsW(&display_class, NULL, NULL, DIGCF_PRESENT);
HDEVINFO device_info;
if (base::win::GetVersion() <= base::win::VERSION_XP) {
// Collection of information on all adapters is much slower on XP (almost
// 100ms), and not very useful (as it's not going to use the GPU anyway), so
// just collect information on the current device. http://crbug.com/456178
device_info =
SetupDiGetClassDevsW(NULL, device_id.c_str(), NULL,
DIGCF_PRESENT | DIGCF_PROFILE | DIGCF_ALLCLASSES);
} else {
device_info =
SetupDiGetClassDevsW(&display_class, NULL, NULL, DIGCF_PRESENT);
}
if (device_info == INVALID_HANDLE_VALUE) {
LOG(ERROR) << "Creating device info failed";
return kCollectInfoNonFatalFailure;
Expand Down

0 comments on commit 6a723d7

Please sign in to comment.