OLD | NEW |
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 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 } | 459 } |
460 SetupDiDestroyDeviceInfoList(device_info); | 460 SetupDiDestroyDeviceInfoList(device_info); |
461 return found ? kCollectInfoSuccess : kCollectInfoNonFatalFailure; | 461 return found ? kCollectInfoSuccess : kCollectInfoNonFatalFailure; |
462 } | 462 } |
463 | 463 |
464 CollectInfoResult CollectContextGraphicsInfo(GPUInfo* gpu_info) { | 464 CollectInfoResult CollectContextGraphicsInfo(GPUInfo* gpu_info) { |
465 TRACE_EVENT0("gpu", "CollectGraphicsInfo"); | 465 TRACE_EVENT0("gpu", "CollectGraphicsInfo"); |
466 | 466 |
467 DCHECK(gpu_info); | 467 DCHECK(gpu_info); |
468 | 468 |
469 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseGL)) { | 469 if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseGL)) { |
470 std::string requested_implementation_name = | 470 std::string requested_implementation_name = |
471 CommandLine::ForCurrentProcess()->GetSwitchValueASCII(switches::kUseGL); | 471 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
| 472 switches::kUseGL); |
472 if (requested_implementation_name == "swiftshader") { | 473 if (requested_implementation_name == "swiftshader") { |
473 gpu_info->software_rendering = true; | 474 gpu_info->software_rendering = true; |
474 gpu_info->context_info_state = kCollectInfoNonFatalFailure; | 475 gpu_info->context_info_state = kCollectInfoNonFatalFailure; |
475 return kCollectInfoNonFatalFailure; | 476 return kCollectInfoNonFatalFailure; |
476 } | 477 } |
477 } | 478 } |
478 | 479 |
479 CollectInfoResult result = CollectGraphicsInfoGL(gpu_info); | 480 CollectInfoResult result = CollectGraphicsInfoGL(gpu_info); |
480 if (result != kCollectInfoSuccess) { | 481 if (result != kCollectInfoSuccess) { |
481 gpu_info->context_info_state = result; | 482 gpu_info->context_info_state = result; |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
703 shader_model, | 704 shader_model, |
704 NUM_SHADER_MODELS); | 705 NUM_SHADER_MODELS); |
705 } | 706 } |
706 | 707 |
707 MergeGPUInfoGL(basic_gpu_info, context_gpu_info); | 708 MergeGPUInfoGL(basic_gpu_info, context_gpu_info); |
708 | 709 |
709 basic_gpu_info->dx_diagnostics = context_gpu_info.dx_diagnostics; | 710 basic_gpu_info->dx_diagnostics = context_gpu_info.dx_diagnostics; |
710 } | 711 } |
711 | 712 |
712 } // namespace gpu | 713 } // namespace gpu |
OLD | NEW |