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_COMMON_GPU_INFO_H__ | 5 #ifndef CHROME_COMMON_GPU_INFO_H__ |
6 #define CHROME_COMMON_GPU_INFO_H__ | 6 #define CHROME_COMMON_GPU_INFO_H__ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 // Provides access to the GPU information for the system | 9 // Provides access to the GPU information for the system |
10 // on which chrome is currently running. | 10 // on which chrome is currently running. |
(...skipping 21 matching lines...) Expand all Loading... |
32 // Return the version of the pixel/fragment shader used by the gpu. | 32 // Return the version of the pixel/fragment shader used by the gpu. |
33 // This will typically be a number less than 10 so storing as a float | 33 // This will typically be a number less than 10 so storing as a float |
34 // should be okay. | 34 // should be okay. |
35 uint32 pixel_shader_version() const; | 35 uint32 pixel_shader_version() const; |
36 | 36 |
37 // Return the version of the vertex shader used by the gpu. | 37 // Return the version of the vertex shader used by the gpu. |
38 // This will typically be a number less than 10 so storing as a float | 38 // This will typically be a number less than 10 so storing as a float |
39 // should be okay. | 39 // should be okay. |
40 uint32 vertex_shader_version() const; | 40 uint32 vertex_shader_version() const; |
41 | 41 |
| 42 // Return the version of OpenGL we are using. |
| 43 // Major version in the high word, minor in the low word, eg version 2.5 |
| 44 // would be 0x00020005. |
| 45 // Returns 0 if we're not using OpenGL, say because we're going through |
| 46 // D3D instead. |
| 47 uint32 gl_version() const; |
| 48 |
42 // Populate variables with passed in values | 49 // Populate variables with passed in values |
43 void SetGraphicsInfo(uint32 vendor_id, uint32 device_id, | 50 void SetGraphicsInfo(uint32 vendor_id, uint32 device_id, |
44 const std::wstring& driver_version, | 51 const std::wstring& driver_version, |
45 uint32 pixel_shader_version, | 52 uint32 pixel_shader_version, |
46 uint32 vertex_shader_version); | 53 uint32 vertex_shader_version, |
| 54 uint32 gl_version); |
47 private: | 55 private: |
48 uint32 vendor_id_; | 56 uint32 vendor_id_; |
49 uint32 device_id_; | 57 uint32 device_id_; |
50 std::wstring driver_version_; | 58 std::wstring driver_version_; |
51 uint32 pixel_shader_version_; | 59 uint32 pixel_shader_version_; |
52 uint32 vertex_shader_version_; | 60 uint32 vertex_shader_version_; |
| 61 uint32 gl_version_; |
53 }; | 62 }; |
54 | 63 |
55 #endif // CHROME_COMMON_GPU_INFO_H__ | 64 #endif // CHROME_COMMON_GPU_INFO_H__ |
OLD | NEW |