Chromium Code Reviews| Index: chrome/common/gpu_info.h |
| =================================================================== |
| --- chrome/common/gpu_info.h (revision 71329) |
| +++ chrome/common/gpu_info.h (working copy) |
| @@ -12,6 +12,7 @@ |
| #include <string> |
| #include "base/basictypes.h" |
| +#include "base/scoped_ptr.h" |
| #include "base/time.h" |
| #include "build/build_config.h" |
| #include "chrome/common/dx_diag_node.h" |
| @@ -42,9 +43,12 @@ |
| // Device ids are unique to vendor, not to one another. |
| uint32 device_id() const; |
| + // Return the vendor of the graphics driver currently installed. |
| + std::string driver_vendor() const; |
| + |
| // Return the version of the graphics driver currently installed. |
| // This will typically be something |
|
Ken Russell (switch to Gerrit)
2011/01/19 22:11:43
Could you complete this previously incomplete comm
Zhenyao Mo
2011/01/19 23:36:22
Done.
|
| - std::wstring driver_version() const; |
| + std::string driver_version() const; |
| // Return the version of the pixel/fragment shader used by the gpu. |
| // This will typically be a number less than 10 so storing as a float |
| @@ -63,6 +67,18 @@ |
| // D3D instead. |
| uint32 gl_version() const; |
|
Ken Russell (switch to Gerrit)
2011/01/19 22:11:43
How can the user of this class tell whether they'r
Zhenyao Mo
2011/01/19 23:36:22
Can't at the moment. I'll add a FIXME here.
|
| + // Return the GL_VERSION string. |
| + // Return "" if we are not using OpenGL. |
| + std::string gl_version_string() const; |
| + |
| + // Return the GL_VENDOR string. |
| + // Return "" if we are not using OpenGL. |
| + std::string gl_vendor() const; |
| + |
| + // Return the GL_RENDERER string. |
| + // Return "" if we are not using OpenGL. |
| + std::string gl_renderer() const; |
| + |
| // Return the device semantics, i.e. whether the Vista and Windows 7 specific |
| // semantics are available. |
| bool can_lose_context() const; |
| @@ -71,14 +87,24 @@ |
| void SetInitializationTime(const base::TimeDelta& initialization_time); |
| - // Populate variables with passed in values |
| - void SetGraphicsInfo(uint32 vendor_id, uint32 device_id, |
| - const std::wstring& driver_version, |
| - uint32 pixel_shader_version, |
| - uint32 vertex_shader_version, |
| - uint32 gl_version, |
| - bool can_lose_context); |
| + void SetVideoCardInfo(uint32 vendor_id, uint32 device_id); |
| + void SetDriverInfo(const std::string& driver_vendor, |
| + const std::string& driver_version); |
| + |
| + void SetShaderVersion(uint32 pixel_shader_version, |
| + uint32 vertex_shader_version); |
| + |
| + void SetGLVersion(uint32 gl_version); |
| + |
| + void SetGLVersionString(const std::string& gl_vendor_string); |
| + |
| + void SetGLVendor(const std::string& gl_vendor); |
| + |
| + void SetGLRenderer(const std::string& gl_renderer); |
| + |
| + void SetCanLoseContext(bool can_lose_context); |
| + |
| #if defined(OS_WIN) |
| // The information returned by the DirectX Diagnostics Tool. |
| const DxDiagNode& dx_diagnostics() const; |
| @@ -91,10 +117,14 @@ |
| base::TimeDelta initialization_time_; |
| uint32 vendor_id_; |
| uint32 device_id_; |
| - std::wstring driver_version_; |
| + std::string driver_vendor_; |
| + std::string driver_version_; |
| uint32 pixel_shader_version_; |
| uint32 vertex_shader_version_; |
| uint32 gl_version_; |
| + std::string gl_version_string_; |
| + std::string gl_vendor_; |
| + std::string gl_renderer_; |
| bool can_lose_context_; |
| #if defined(OS_WIN) |