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 #ifndef GPU_CONFIG_GPU_INFO_H_ | 5 #ifndef GPU_CONFIG_GPU_INFO_H_ |
6 #define GPU_CONFIG_GPU_INFO_H_ | 6 #define GPU_CONFIG_GPU_INFO_H_ |
7 | 7 |
8 // Provides access to the GPU information for the system | 8 // Provides access to the GPU information for the system |
9 // on which chrome is currently running. | 9 // on which chrome is currently running. |
10 | 10 |
11 #include <string> | 11 #include <string> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/basictypes.h" | 14 #include "base/basictypes.h" |
15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
16 #include "base/version.h" | 16 #include "base/version.h" |
17 #include "build/build_config.h" | 17 #include "build/build_config.h" |
18 #include "gpu/config/dx_diag_node.h" | 18 #include "gpu/config/dx_diag_node.h" |
19 #include "gpu/config/gpu_performance_stats.h" | |
20 #include "gpu/gpu_export.h" | 19 #include "gpu/gpu_export.h" |
21 #include "ui/gfx/geometry/size.h" | 20 #include "ui/gfx/geometry/size.h" |
22 | 21 |
23 namespace gpu { | 22 namespace gpu { |
24 | 23 |
25 // Result for the various Collect*Info* functions below. | 24 // Result for the various Collect*Info* functions below. |
26 // Fatal failures are for cases where we can't create a context at all or | 25 // Fatal failures are for cases where we can't create a context at all or |
27 // something, making the use of the GPU impossible. | 26 // something, making the use of the GPU impossible. |
28 // Non-fatal failures are for cases where we could gather most info, but maybe | 27 // Non-fatal failures are for cases where we could gather most info, but maybe |
29 // some is missing (e.g. unable to parse a version string or to detect the exact | 28 // some is missing (e.g. unable to parse a version string or to detect the exact |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 std::string gl_ws_extensions; | 172 std::string gl_ws_extensions; |
174 | 173 |
175 // GL reset notification strategy as defined by GL_ARB_robustness. 0 if GPU | 174 // GL reset notification strategy as defined by GL_ARB_robustness. 0 if GPU |
176 // reset detection or notification not available. | 175 // reset detection or notification not available. |
177 uint32 gl_reset_notification_strategy; | 176 uint32 gl_reset_notification_strategy; |
178 | 177 |
179 // The device semantics, i.e. whether the Vista and Windows 7 specific | 178 // The device semantics, i.e. whether the Vista and Windows 7 specific |
180 // semantics are available. | 179 // semantics are available. |
181 bool can_lose_context; | 180 bool can_lose_context; |
182 | 181 |
183 // By default all values are 0. | |
184 GpuPerformanceStats performance_stats; | |
185 | |
186 bool software_rendering; | 182 bool software_rendering; |
187 | 183 |
188 // Whether the driver uses direct rendering. True on most platforms, false on | 184 // Whether the driver uses direct rendering. True on most platforms, false on |
189 // X11 when using remote X. | 185 // X11 when using remote X. |
190 bool direct_rendering; | 186 bool direct_rendering; |
191 | 187 |
192 // Whether the gpu process is running in a sandbox. | 188 // Whether the gpu process is running in a sandbox. |
193 bool sandboxed; | 189 bool sandboxed; |
194 | 190 |
195 // Number of GPU process crashes recorded. | 191 // Number of GPU process crashes recorded. |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 virtual ~Enumerator() {} | 242 virtual ~Enumerator() {} |
247 }; | 243 }; |
248 | 244 |
249 // Outputs the fields in this structure to the provided enumerator. | 245 // Outputs the fields in this structure to the provided enumerator. |
250 void EnumerateFields(Enumerator* enumerator) const; | 246 void EnumerateFields(Enumerator* enumerator) const; |
251 }; | 247 }; |
252 | 248 |
253 } // namespace gpu | 249 } // namespace gpu |
254 | 250 |
255 #endif // GPU_CONFIG_GPU_INFO_H_ | 251 #endif // GPU_CONFIG_GPU_INFO_H_ |
OLD | NEW |