| 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_H__ | 5 #ifndef CHROME_GPU_GPU_INFO_H__ |
| 6 #define CHROME_GPU_GPU_INFO_H__ | 6 #define CHROME_GPU_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 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 // Return the version of the vertex shader used by the gpu. | 38 // Return the version of the vertex shader used by the gpu. |
| 39 // This will typically be a number less than 10 so storing as a float | 39 // This will typically be a number less than 10 so storing as a float |
| 40 // should be okay. | 40 // should be okay. |
| 41 uint32 vertex_shader_version() const; | 41 uint32 vertex_shader_version() const; |
| 42 | 42 |
| 43 // Populate variables with necessary graphics card information. | 43 // Populate variables with necessary graphics card information. |
| 44 // Returns true on success. | 44 // Returns true on success. |
| 45 bool CollectGraphicsInfo(); | 45 bool CollectGraphicsInfo(); |
| 46 | 46 |
| 47 // Populate variables with passed in values |
| 48 void SetGraphicsInfo(uint32 vendor_id, uint32 device_id, |
| 49 const std::wstring& driver_version, |
| 50 uint32 pixel_shader_version, |
| 51 uint32 vertex_shader_version); |
| 52 |
| 47 #if defined(OS_WIN) | 53 #if defined(OS_WIN) |
| 48 // Windows provides two ways of doing graphics so we need two ways of | 54 // Windows provides two ways of doing graphics so we need two ways of |
| 49 // collecting info based on what's on a user's machine. | 55 // collecting info based on what's on a user's machine. |
| 50 // The selection between the two methods is done in the cc file. | 56 // The selection between the two methods is done in the cc file. |
| 51 | 57 |
| 52 // A D3D argument is passed in for testing purposes | 58 // A D3D argument is passed in for testing purposes |
| 53 bool CollectGraphicsInfoD3D(IDirect3D9* d3d); | 59 bool CollectGraphicsInfoD3D(IDirect3D9* d3d); |
| 54 | 60 |
| 55 // The GL version of collecting information | 61 // The GL version of collecting information |
| 56 bool CollectGraphicsInfoGL(); | 62 bool CollectGraphicsInfoGL(); |
| 57 #endif | 63 #endif |
| 58 | 64 |
| 59 private: | 65 private: |
| 60 uint32 vendor_id_; | 66 uint32 vendor_id_; |
| 61 uint32 device_id_; | 67 uint32 device_id_; |
| 62 std::wstring driver_version_; | 68 std::wstring driver_version_; |
| 63 uint32 pixel_shader_version_; | 69 uint32 pixel_shader_version_; |
| 64 uint32 vertex_shader_version_; | 70 uint32 vertex_shader_version_; |
| 65 }; | 71 }; |
| 66 | 72 |
| 67 #endif // CHROME_GPU_GPU_INFO_H__ | 73 #endif // CHROME_GPU_GPU_INFO_H__ |
| OLD | NEW |