OLD | NEW |
| (Empty) |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_COMMON_GPU_INFO_H__ | |
6 #define CHROME_COMMON_GPU_INFO_H__ | |
7 #pragma once | |
8 | |
9 // Provides access to the GPU information for the system | |
10 // on which chrome is currently running. | |
11 | |
12 #include <string> | |
13 | |
14 #include "base/basictypes.h" | |
15 #include "base/scoped_ptr.h" | |
16 #include "base/time.h" | |
17 #include "build/build_config.h" | |
18 #include "chrome/common/dx_diag_node.h" | |
19 | |
20 struct GPUInfo { | |
21 GPUInfo(); | |
22 ~GPUInfo(); | |
23 | |
24 enum Level { | |
25 kUninitialized, | |
26 kPreliminary, | |
27 kPartial, | |
28 kCompleting, | |
29 kComplete, | |
30 }; | |
31 | |
32 // Whether this GPUInfo has been partially or fully initialized with | |
33 // information. | |
34 Level level; | |
35 | |
36 // The amount of time taken to get from the process starting to the message | |
37 // loop being pumped. | |
38 base::TimeDelta initialization_time; | |
39 | |
40 // The DWORD (uint32) representing the graphics card vendor id. | |
41 uint32 vendor_id; | |
42 | |
43 // The DWORD (uint32) representing the graphics card device id. Device ids | |
44 // are unique to vendor, not to one another. | |
45 uint32 device_id; | |
46 | |
47 // The vendor of the graphics driver currently installed. | |
48 std::string driver_vendor; | |
49 | |
50 // The version of the graphics driver currently installed. | |
51 std::string driver_version; | |
52 | |
53 // The date of the graphics driver currently installed. | |
54 std::string driver_date; | |
55 | |
56 // The version of the pixel/fragment shader used by the gpu. Major version in | |
57 // the second lowest 8 bits, minor in the lowest 8 bits, eg version 2.5 would | |
58 // be 0x00000205. | |
59 uint32 pixel_shader_version; | |
60 | |
61 // The version of the vertex shader used by the gpu. Major version in the | |
62 // second lowest 8 bits, minor in the lowest 8 bits, eg version 2.5 would be | |
63 // 0x00000205. | |
64 uint32 vertex_shader_version; | |
65 | |
66 // The version of OpenGL we are using. | |
67 // Major version in the second lowest 8 bits, minor in the lowest 8 bits, | |
68 // eg version 2.5 would be 0x00000205. | |
69 // Returns 0 if we're not using OpenGL, say because we're going through | |
70 // D3D instead. | |
71 // TODO(zmo): should be able to tell if it's GL or GLES. | |
72 uint32 gl_version; | |
73 | |
74 // The GL_VERSION string. "" if we are not using OpenGL. | |
75 std::string gl_version_string; | |
76 | |
77 // The GL_VENDOR string. "" if we are not using OpenGL. | |
78 std::string gl_vendor; | |
79 | |
80 // The GL_RENDERER string. "" if we are not using OpenGL. | |
81 std::string gl_renderer; | |
82 | |
83 // The GL_EXTENSIONS string. "" if we are not using OpenGL. | |
84 std::string gl_extensions; | |
85 | |
86 // The device semantics, i.e. whether the Vista and Windows 7 specific | |
87 // semantics are available. | |
88 bool can_lose_context; | |
89 | |
90 // True if there was an error at any stage of collecting GPUInfo data. | |
91 // If there was an error, then the GPUInfo fields may be incomplete or set | |
92 // to default values such as 0 or empty string. | |
93 bool collection_error; | |
94 | |
95 #if defined(OS_WIN) | |
96 // The information returned by the DirectX Diagnostics Tool. | |
97 DxDiagNode dx_diagnostics; | |
98 #endif | |
99 }; | |
100 | |
101 #endif // CHROME_COMMON_GPU_INFO_H__ | |
OLD | NEW |