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 <stdint.h> | 11 #include <stdint.h> |
12 | 12 |
13 #include <string> | 13 #include <string> |
14 #include <vector> | 14 #include <vector> |
15 | 15 |
16 #include "base/time/time.h" | 16 #include "base/time/time.h" |
17 #include "base/version.h" | 17 #include "base/version.h" |
18 #include "build/build_config.h" | 18 #include "build/build_config.h" |
19 #include "gpu/config/dx_diag_node.h" | 19 #include "gpu/config/dx_diag_node.h" |
20 #include "gpu/gpu_export.h" | 20 #include "gpu/gpu_export.h" |
21 #include "ui/gfx/geometry/size.h" | 21 #include "ui/gfx/geometry/size.h" |
22 | 22 |
| 23 #if defined(USE_X11) && !defined(OS_CHROMEOS) |
| 24 typedef unsigned long VisualID; |
| 25 #endif |
| 26 |
23 namespace gpu { | 27 namespace gpu { |
24 | 28 |
25 // Result for the various Collect*Info* functions below. | 29 // Result for the various Collect*Info* functions below. |
26 // Fatal failures are for cases where we can't create a context at all or | 30 // Fatal failures are for cases where we can't create a context at all or |
27 // something, making the use of the GPU impossible. | 31 // something, making the use of the GPU impossible. |
28 // Non-fatal failures are for cases where we could gather most info, but maybe | 32 // 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 | 33 // some is missing (e.g. unable to parse a version string or to detect the exact |
30 // model). | 34 // model). |
31 enum CollectInfoResult { | 35 enum CollectInfoResult { |
32 kCollectInfoNone = 0, | 36 kCollectInfoNone = 0, |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 | 233 |
230 // The information returned by the DirectX Diagnostics Tool. | 234 // The information returned by the DirectX Diagnostics Tool. |
231 DxDiagNode dx_diagnostics; | 235 DxDiagNode dx_diagnostics; |
232 #endif | 236 #endif |
233 | 237 |
234 VideoDecodeAcceleratorCapabilities video_decode_accelerator_capabilities; | 238 VideoDecodeAcceleratorCapabilities video_decode_accelerator_capabilities; |
235 VideoEncodeAcceleratorSupportedProfiles | 239 VideoEncodeAcceleratorSupportedProfiles |
236 video_encode_accelerator_supported_profiles; | 240 video_encode_accelerator_supported_profiles; |
237 bool jpeg_decode_accelerator_supported; | 241 bool jpeg_decode_accelerator_supported; |
238 | 242 |
| 243 #if defined(USE_X11) && !defined(OS_CHROMEOS) |
| 244 VisualID system_visual; |
| 245 VisualID rgba_visual; |
| 246 #endif |
| 247 |
239 // Note: when adding new members, please remember to update EnumerateFields | 248 // Note: when adding new members, please remember to update EnumerateFields |
240 // in gpu_info.cc. | 249 // in gpu_info.cc. |
241 | 250 |
242 // In conjunction with EnumerateFields, this allows the embedder to | 251 // In conjunction with EnumerateFields, this allows the embedder to |
243 // enumerate the values in this structure without having to embed | 252 // enumerate the values in this structure without having to embed |
244 // references to its specific member variables. This simplifies the | 253 // references to its specific member variables. This simplifies the |
245 // addition of new fields to this type. | 254 // addition of new fields to this type. |
246 class Enumerator { | 255 class Enumerator { |
247 public: | 256 public: |
248 // The following methods apply to the "current" object. Initially this | 257 // The following methods apply to the "current" object. Initially this |
(...skipping 30 matching lines...) Expand all Loading... |
279 virtual ~Enumerator() {} | 288 virtual ~Enumerator() {} |
280 }; | 289 }; |
281 | 290 |
282 // Outputs the fields in this structure to the provided enumerator. | 291 // Outputs the fields in this structure to the provided enumerator. |
283 void EnumerateFields(Enumerator* enumerator) const; | 292 void EnumerateFields(Enumerator* enumerator) const; |
284 }; | 293 }; |
285 | 294 |
286 } // namespace gpu | 295 } // namespace gpu |
287 | 296 |
288 #endif // GPU_CONFIG_GPU_INFO_H_ | 297 #endif // GPU_CONFIG_GPU_INFO_H_ |
OLD | NEW |