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 "content/gpu/gpu_info_collector.h" | 5 #include "content/gpu/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 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
491 RE2::PartialMatch(gpu_info->gl_renderer, | 491 RE2::PartialMatch(gpu_info->gl_renderer, |
492 " vs_(\\d+)_(\\d+)", | 492 " vs_(\\d+)_(\\d+)", |
493 &vertex_shader_major_version, | 493 &vertex_shader_major_version, |
494 &vertex_shader_minor_version) && | 494 &vertex_shader_minor_version) && |
495 RE2::PartialMatch(gpu_info->gl_renderer, | 495 RE2::PartialMatch(gpu_info->gl_renderer, |
496 " ps_(\\d+)_(\\d+)", | 496 " ps_(\\d+)_(\\d+)", |
497 &pixel_shader_major_version, | 497 &pixel_shader_major_version, |
498 &pixel_shader_minor_version)) { | 498 &pixel_shader_minor_version)) { |
499 gpu_info->can_lose_context = direct3d_version == "9"; | 499 gpu_info->can_lose_context = direct3d_version == "9"; |
500 gpu_info->vertex_shader_version = | 500 gpu_info->vertex_shader_version = |
501 StringPrintf("%d.%d", | 501 base::StringPrintf("%d.%d", |
502 vertex_shader_major_version, | 502 vertex_shader_major_version, |
503 vertex_shader_minor_version); | 503 vertex_shader_minor_version); |
504 gpu_info->pixel_shader_version = | 504 gpu_info->pixel_shader_version = |
505 StringPrintf("%d.%d", | 505 base::StringPrintf("%d.%d", |
506 pixel_shader_major_version, | 506 pixel_shader_major_version, |
507 pixel_shader_minor_version); | 507 pixel_shader_minor_version); |
508 | 508 |
509 // DirectX diagnostics are collected asynchronously because it takes a | 509 // DirectX diagnostics are collected asynchronously because it takes a |
510 // couple of seconds. Do not mark gpu_info as complete until that is done. | 510 // couple of seconds. Do not mark gpu_info as complete until that is done. |
511 gpu_info->finalized = false; | 511 gpu_info->finalized = false; |
512 } else { | 512 } else { |
513 gpu_info->finalized = true; | 513 gpu_info->finalized = true; |
514 } | 514 } |
515 | 515 |
516 return true; | 516 return true; |
517 } | 517 } |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
632 basic_gpu_info->software_rendering = true; | 632 basic_gpu_info->software_rendering = true; |
633 return; | 633 return; |
634 } | 634 } |
635 | 635 |
636 MergeGPUInfoGL(basic_gpu_info, context_gpu_info); | 636 MergeGPUInfoGL(basic_gpu_info, context_gpu_info); |
637 | 637 |
638 basic_gpu_info->dx_diagnostics = context_gpu_info.dx_diagnostics; | 638 basic_gpu_info->dx_diagnostics = context_gpu_info.dx_diagnostics; |
639 } | 639 } |
640 | 640 |
641 } // namespace gpu_info_collector | 641 } // namespace gpu_info_collector |
OLD | NEW |