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

Side by Side Diff: gpu/config/gpu_info_collector_win.cc

Issue 2557513005: Fix a bug that GPU process may fail to launch in RDP sessions (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gpu/config/gpu_info_collector.h" 5 #include "gpu/config/gpu_info_collector.h"
6 6
7 // This has to be included before windows.h. 7 // This has to be included before windows.h.
8 #include "third_party/re2/src/re2/re2.h" 8 #include "third_party/re2/src/re2/re2.h"
9 9
10 #include <windows.h> 10 #include <windows.h>
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 dd.cb = sizeof(DISPLAY_DEVICE); 416 dd.cb = sizeof(DISPLAY_DEVICE);
417 std::wstring id; 417 std::wstring id;
418 for (int i = 0; EnumDisplayDevices(NULL, i, &dd, 0); ++i) { 418 for (int i = 0; EnumDisplayDevices(NULL, i, &dd, 0); ++i) {
419 if (dd.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE) { 419 if (dd.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE) {
420 id = dd.DeviceID; 420 id = dd.DeviceID;
421 break; 421 break;
422 } 422 }
423 } 423 }
424 424
425 if (id.length() <= 20) { 425 if (id.length() <= 20) {
426 gpu_info->basic_info_state = kCollectInfoNonFatalFailure; 426 // Check if it is the RDP mirror driver "RDPUDD Chained DD"
427 return kCollectInfoNonFatalFailure; 427 if (wcscmp(dd.DeviceString, L"RDPUDD Chained DD") != 0) {
428 gpu_info->basic_info_state = kCollectInfoNonFatalFailure;
429 return kCollectInfoNonFatalFailure;
430 }
428 } 431 }
429 432
430 DeviceIDToVendorAndDevice(id, &gpu_info->gpu.vendor_id, 433 DeviceIDToVendorAndDevice(id, &gpu_info->gpu.vendor_id,
431 &gpu_info->gpu.device_id); 434 &gpu_info->gpu.device_id);
432 // TODO(zmo): we only need to call CollectDriverInfoD3D() if we use ANGLE. 435 // TODO(zmo): we only need to call CollectDriverInfoD3D() if we use ANGLE.
433 if (!CollectDriverInfoD3D(id, gpu_info)) { 436 if (!CollectDriverInfoD3D(id, gpu_info)) {
434 gpu_info->basic_info_state = kCollectInfoNonFatalFailure; 437 gpu_info->basic_info_state = kCollectInfoNonFatalFailure;
435 return kCollectInfoNonFatalFailure; 438 return kCollectInfoNonFatalFailure;
436 } 439 }
437 440
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 } 502 }
500 503
501 MergeGPUInfoGL(basic_gpu_info, context_gpu_info); 504 MergeGPUInfoGL(basic_gpu_info, context_gpu_info);
502 505
503 basic_gpu_info->dx_diagnostics_info_state = 506 basic_gpu_info->dx_diagnostics_info_state =
504 context_gpu_info.dx_diagnostics_info_state; 507 context_gpu_info.dx_diagnostics_info_state;
505 basic_gpu_info->dx_diagnostics = context_gpu_info.dx_diagnostics; 508 basic_gpu_info->dx_diagnostics = context_gpu_info.dx_diagnostics;
506 } 509 }
507 510
508 } // namespace gpu 511 } // namespace gpu
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698