OLD | NEW |
1 // Copyright (c) 2006-2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2010 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 #ifndef CHROME_GPU_GPU_INFO_COLLECTOR_H__ | 5 #ifndef CHROME_GPU_GPU_INFO_COLLECTOR_H__ |
6 #define CHROME_GPU_GPU_INFO_COLLECTOR_H__ | 6 #define CHROME_GPU_GPU_INFO_COLLECTOR_H__ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
11 #include "chrome/common/dx_diag_node.h" | 11 #include "chrome/common/dx_diag_node.h" |
12 #include "chrome/common/gpu_info.h" | 12 #include "chrome/common/gpu_info.h" |
13 | 13 |
14 struct IDirect3D9; | 14 struct IDirect3D9; |
15 | 15 |
16 namespace gpu_info_collector { | 16 namespace gpu_info_collector { |
17 | 17 |
18 // Populate variables with necessary graphics card information. | 18 // Populate variables with necessary graphics card information. |
19 // Returns true on success. | 19 // Returns true on success. |
20 bool CollectGraphicsInfo(GPUInfo* gpu_info); | 20 bool CollectGraphicsInfo(GPUInfo* gpu_info); |
21 | 21 |
22 #if defined(OS_WIN) | 22 #if defined(OS_WIN) |
23 // Windows provides two ways of doing graphics so we need two ways of | 23 // Windows provides two ways of doing graphics so we need two ways of |
24 // collecting info based on what's on a user's machine. | 24 // collecting info based on what's on a user's machine. |
25 // The selection between the two methods is done in the cc file. | 25 // The selection between the two methods is done in the cc file. |
26 | 26 |
27 // A D3D argument is passed in for testing purposes | 27 // A D3D argument is passed in for testing purposes |
28 bool CollectGraphicsInfoD3D(IDirect3D9* d3d, GPUInfo* gpu_info); | 28 bool CollectGraphicsInfoD3D(IDirect3D9* d3d, GPUInfo* gpu_info); |
29 | 29 |
30 // The GL version of collecting information | |
31 bool CollectGraphicsInfoGL(GPUInfo* gpu_info); | |
32 | |
33 // Collect the DirectX Disagnostics information about the attached displays. | 30 // Collect the DirectX Disagnostics information about the attached displays. |
34 bool GetDxDiagnostics(DxDiagNode* output); | 31 bool GetDxDiagnostics(DxDiagNode* output); |
35 #endif | 32 #endif |
36 | 33 |
| 34 // All platforms have a GL version for collecting information |
| 35 bool CollectGraphicsInfoGL(GPUInfo* gpu_info); |
| 36 |
| 37 // Collect GL and Shading language version information |
| 38 bool CollectGLVersionInfo(GPUInfo* gpu_info); |
| 39 |
| 40 // Platform specific method for collecting vendor and device ids |
| 41 bool CollectVideoCardInfo(GPUInfo* gpu_info); |
| 42 |
| 43 // Each platform stores the driver version on the GL_VERSION string differently |
| 44 bool CollectDriverInfo(GPUInfo* gpu_info); |
| 45 |
37 } // namespace gpu_info_collector | 46 } // namespace gpu_info_collector |
38 | 47 |
39 #endif // CHROME_GPU_GPU_INFO_COLLECTOR_H__ | 48 #endif // CHROME_GPU_GPU_INFO_COLLECTOR_H__ |
OLD | NEW |