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

Unified Diff: gpu/config/gpu_info_collector_win.cc

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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.cc ('k') | gpu/gles2_conform_support/egl/display.h » ('j') | 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 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;
« no previous file with comments | « gpu/config/gpu_info_collector.cc ('k') | gpu/gles2_conform_support/egl/display.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698