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/src/re2/re2.h" | 8 #include "third_party/re2/src/re2/re2.h" |
9 | 9 |
10 #include <windows.h> | 10 #include <windows.h> |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 vertex_shader_major_version, | 332 vertex_shader_major_version, |
333 vertex_shader_minor_version); | 333 vertex_shader_minor_version); |
334 gpu_info->pixel_shader_version = | 334 gpu_info->pixel_shader_version = |
335 base::StringPrintf("%d.%d", | 335 base::StringPrintf("%d.%d", |
336 pixel_shader_major_version, | 336 pixel_shader_major_version, |
337 pixel_shader_minor_version); | 337 pixel_shader_minor_version); |
338 | 338 |
339 // ANGLE's EGL vendor strings are of the form: | 339 // ANGLE's EGL vendor strings are of the form: |
340 // Google, Inc. (adapter LUID: 0123456789ABCDEF) | 340 // Google, Inc. (adapter LUID: 0123456789ABCDEF) |
341 // The LUID is optional and identifies the GPU adapter ANGLE is using. | 341 // The LUID is optional and identifies the GPU adapter ANGLE is using. |
342 const char* egl_vendor = eglQueryString( | 342 const char* egl_vendor = |
343 gfx::GLSurfaceEGL::GetHardwareDisplay(), | 343 eglQueryString(gl::GLSurfaceEGL::GetHardwareDisplay(), EGL_VENDOR); |
344 EGL_VENDOR); | |
345 RE2::PartialMatch(egl_vendor, | 344 RE2::PartialMatch(egl_vendor, |
346 " \\(adapter LUID: ([0-9A-Fa-f]{16})\\)", | 345 " \\(adapter LUID: ([0-9A-Fa-f]{16})\\)", |
347 RE2::Hex(&gpu_info->adapter_luid)); | 346 RE2::Hex(&gpu_info->adapter_luid)); |
348 | 347 |
349 // DirectX diagnostics are collected asynchronously because it takes a | 348 // DirectX diagnostics are collected asynchronously because it takes a |
350 // couple of seconds. | 349 // couple of seconds. |
351 } else { | 350 } else { |
352 gpu_info->dx_diagnostics_info_state = kCollectInfoNonFatalFailure; | 351 gpu_info->dx_diagnostics_info_state = kCollectInfoNonFatalFailure; |
353 } | 352 } |
354 | 353 |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
495 } | 494 } |
496 | 495 |
497 MergeGPUInfoGL(basic_gpu_info, context_gpu_info); | 496 MergeGPUInfoGL(basic_gpu_info, context_gpu_info); |
498 | 497 |
499 basic_gpu_info->dx_diagnostics_info_state = | 498 basic_gpu_info->dx_diagnostics_info_state = |
500 context_gpu_info.dx_diagnostics_info_state; | 499 context_gpu_info.dx_diagnostics_info_state; |
501 basic_gpu_info->dx_diagnostics = context_gpu_info.dx_diagnostics; | 500 basic_gpu_info->dx_diagnostics = context_gpu_info.dx_diagnostics; |
502 } | 501 } |
503 | 502 |
504 } // namespace gpu | 503 } // namespace gpu |
OLD | NEW |