| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 std::string gl_version_string() const; | 72 std::string gl_version_string() const; |
| 73 | 73 |
| 74 // Return the GL_VENDOR string. | 74 // Return the GL_VENDOR string. |
| 75 // Return "" if we are not using OpenGL. | 75 // Return "" if we are not using OpenGL. |
| 76 std::string gl_vendor() const; | 76 std::string gl_vendor() const; |
| 77 | 77 |
| 78 // Return the GL_RENDERER string. | 78 // Return the GL_RENDERER string. |
| 79 // Return "" if we are not using OpenGL. | 79 // Return "" if we are not using OpenGL. |
| 80 std::string gl_renderer() const; | 80 std::string gl_renderer() const; |
| 81 | 81 |
| 82 // Return the GL_EXTENSIONS string. | |
| 83 // Return "" if we are not using OpenGL. | |
| 84 std::string gl_extensions() const; | |
| 85 | |
| 86 // Return the device semantics, i.e. whether the Vista and Windows 7 specific | 82 // Return the device semantics, i.e. whether the Vista and Windows 7 specific |
| 87 // semantics are available. | 83 // semantics are available. |
| 88 bool can_lose_context() const; | 84 bool can_lose_context() const; |
| 89 | 85 |
| 90 void SetProgress(Progress progress); | 86 void SetProgress(Progress progress); |
| 91 | 87 |
| 92 void SetInitializationTime(const base::TimeDelta& initialization_time); | 88 void SetInitializationTime(const base::TimeDelta& initialization_time); |
| 93 | 89 |
| 94 void SetVideoCardInfo(uint32 vendor_id, uint32 device_id); | 90 void SetVideoCardInfo(uint32 vendor_id, uint32 device_id); |
| 95 | 91 |
| 96 void SetDriverInfo(const std::string& driver_vendor, | 92 void SetDriverInfo(const std::string& driver_vendor, |
| 97 const std::string& driver_version); | 93 const std::string& driver_version); |
| 98 | 94 |
| 99 void SetShaderVersion(uint32 pixel_shader_version, | 95 void SetShaderVersion(uint32 pixel_shader_version, |
| 100 uint32 vertex_shader_version); | 96 uint32 vertex_shader_version); |
| 101 | 97 |
| 102 void SetGLVersion(uint32 gl_version); | 98 void SetGLVersion(uint32 gl_version); |
| 103 | 99 |
| 104 void SetGLVersionString(const std::string& gl_vendor_string); | 100 void SetGLVersionString(const std::string& gl_vendor_string); |
| 105 | 101 |
| 106 void SetGLVendor(const std::string& gl_vendor); | 102 void SetGLVendor(const std::string& gl_vendor); |
| 107 | 103 |
| 108 void SetGLRenderer(const std::string& gl_renderer); | 104 void SetGLRenderer(const std::string& gl_renderer); |
| 109 | 105 |
| 110 void SetGLExtensions(const std::string& gl_extensions); | |
| 111 | |
| 112 void SetCanLoseContext(bool can_lose_context); | 106 void SetCanLoseContext(bool can_lose_context); |
| 113 | 107 |
| 114 #if defined(OS_WIN) | 108 #if defined(OS_WIN) |
| 115 // The information returned by the DirectX Diagnostics Tool. | 109 // The information returned by the DirectX Diagnostics Tool. |
| 116 const DxDiagNode& dx_diagnostics() const; | 110 const DxDiagNode& dx_diagnostics() const; |
| 117 | 111 |
| 118 void SetDxDiagnostics(const DxDiagNode& dx_diagnostics); | 112 void SetDxDiagnostics(const DxDiagNode& dx_diagnostics); |
| 119 #endif | 113 #endif |
| 120 | 114 |
| 121 private: | 115 private: |
| 122 Progress progress_; | 116 Progress progress_; |
| 123 base::TimeDelta initialization_time_; | 117 base::TimeDelta initialization_time_; |
| 124 uint32 vendor_id_; | 118 uint32 vendor_id_; |
| 125 uint32 device_id_; | 119 uint32 device_id_; |
| 126 std::string driver_vendor_; | 120 std::string driver_vendor_; |
| 127 std::string driver_version_; | 121 std::string driver_version_; |
| 128 uint32 pixel_shader_version_; | 122 uint32 pixel_shader_version_; |
| 129 uint32 vertex_shader_version_; | 123 uint32 vertex_shader_version_; |
| 130 uint32 gl_version_; | 124 uint32 gl_version_; |
| 131 std::string gl_version_string_; | 125 std::string gl_version_string_; |
| 132 std::string gl_vendor_; | 126 std::string gl_vendor_; |
| 133 std::string gl_renderer_; | 127 std::string gl_renderer_; |
| 134 std::string gl_extensions_; | |
| 135 bool can_lose_context_; | 128 bool can_lose_context_; |
| 136 | 129 |
| 137 #if defined(OS_WIN) | 130 #if defined(OS_WIN) |
| 138 DxDiagNode dx_diagnostics_; | 131 DxDiagNode dx_diagnostics_; |
| 139 #endif | 132 #endif |
| 140 }; | 133 }; |
| 141 | 134 |
| 142 #endif // CHROME_COMMON_GPU_INFO_H__ | 135 #endif // CHROME_COMMON_GPU_INFO_H__ |
| OLD | NEW |