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 a5686a9de6ad8b2a53087aef5ed719fc7b86c50a..4deee7c497bcbb59c8882b31e9ea23ebd28c856b 100644 |
--- a/gpu/config/gpu_info_collector_win.cc |
+++ b/gpu/config/gpu_info_collector_win.cc |
@@ -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; |