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

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

Issue 299113003: Add win8.1 support to GPUBotConfig (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | gpu/config/gpu_info_collector_x11.cc » ('j') | gpu/config/gpu_test_config.cc » ('J')
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/re2/re2.h" 8 #include "third_party/re2/re2/re2.h"
9 9
10 #include <windows.h> 10 #include <windows.h>
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 } 538 }
539 539
540 if (id.length() > 20) { 540 if (id.length() > 20) {
541 int vendor = 0, device = 0; 541 int vendor = 0, device = 0;
542 std::wstring vendor_string = id.substr(8, 4); 542 std::wstring vendor_string = id.substr(8, 4);
543 std::wstring device_string = id.substr(17, 4); 543 std::wstring device_string = id.substr(17, 4);
544 base::HexStringToInt(base::UTF16ToASCII(vendor_string), &vendor); 544 base::HexStringToInt(base::UTF16ToASCII(vendor_string), &vendor);
545 base::HexStringToInt(base::UTF16ToASCII(device_string), &device); 545 base::HexStringToInt(base::UTF16ToASCII(device_string), &device);
546 *vendor_id = vendor; 546 *vendor_id = vendor;
547 *device_id = device; 547 *device_id = device;
548 return kGpuIDSuccess; 548 if (*vendor_id != 0 && *device_id != 0)
549 return kGpuIDSuccess;
549 } 550 }
550 return kGpuIDFailure; 551 return kGpuIDFailure;
551 } 552 }
552 553
553 CollectInfoResult CollectBasicGraphicsInfo(GPUInfo* gpu_info) { 554 CollectInfoResult CollectBasicGraphicsInfo(GPUInfo* gpu_info) {
554 TRACE_EVENT0("gpu", "CollectPreliminaryGraphicsInfo"); 555 TRACE_EVENT0("gpu", "CollectPreliminaryGraphicsInfo");
555 556
556 DCHECK(gpu_info); 557 DCHECK(gpu_info);
557 558
558 gpu_info->performance_stats = RetrieveGpuPerformanceStatsWithHistograms(); 559 gpu_info->performance_stats = RetrieveGpuPerformanceStatsWithHistograms();
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 basic_gpu_info->software_rendering = true; 647 basic_gpu_info->software_rendering = true;
647 return; 648 return;
648 } 649 }
649 650
650 MergeGPUInfoGL(basic_gpu_info, context_gpu_info); 651 MergeGPUInfoGL(basic_gpu_info, context_gpu_info);
651 652
652 basic_gpu_info->dx_diagnostics = context_gpu_info.dx_diagnostics; 653 basic_gpu_info->dx_diagnostics = context_gpu_info.dx_diagnostics;
653 } 654 }
654 655
655 } // namespace gpu 656 } // namespace gpu
OLDNEW
« no previous file with comments | « no previous file | gpu/config/gpu_info_collector_x11.cc » ('j') | gpu/config/gpu_test_config.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698