| 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 |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 // In Win/MacOSX, these two strings are not filled at the moment. | 112 // In Win/MacOSX, these two strings are not filled at the moment. |
| 113 // In Android, these are respectively GL_VENDOR and GL_RENDERER. | 113 // In Android, these are respectively GL_VENDOR and GL_RENDERER. |
| 114 std::string vendor_string; | 114 std::string vendor_string; |
| 115 std::string device_string; | 115 std::string device_string; |
| 116 }; | 116 }; |
| 117 | 117 |
| 118 GPUInfo(); | 118 GPUInfo(); |
| 119 GPUInfo(const GPUInfo& other); | 119 GPUInfo(const GPUInfo& other); |
| 120 ~GPUInfo(); | 120 ~GPUInfo(); |
| 121 | 121 |
| 122 bool SupportsAccelerated2dCanvas() const { | |
| 123 return !can_lose_context && !software_rendering; | |
| 124 } | |
| 125 | |
| 126 // The amount of time taken to get from the process starting to the message | 122 // The amount of time taken to get from the process starting to the message |
| 127 // loop being pumped. | 123 // loop being pumped. |
| 128 base::TimeDelta initialization_time; | 124 base::TimeDelta initialization_time; |
| 129 | 125 |
| 130 // Computer has NVIDIA Optimus | 126 // Computer has NVIDIA Optimus |
| 131 bool optimus; | 127 bool optimus; |
| 132 | 128 |
| 133 // Computer has AMD Dynamic Switchable Graphics | 129 // Computer has AMD Dynamic Switchable Graphics |
| 134 bool amd_switchable; | 130 bool amd_switchable; |
| 135 | 131 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 // GL window system binding version. "" if not available. | 198 // GL window system binding version. "" if not available. |
| 203 std::string gl_ws_version; | 199 std::string gl_ws_version; |
| 204 | 200 |
| 205 // GL window system binding extensions. "" if not available. | 201 // GL window system binding extensions. "" if not available. |
| 206 std::string gl_ws_extensions; | 202 std::string gl_ws_extensions; |
| 207 | 203 |
| 208 // GL reset notification strategy as defined by GL_ARB_robustness. 0 if GPU | 204 // GL reset notification strategy as defined by GL_ARB_robustness. 0 if GPU |
| 209 // reset detection or notification not available. | 205 // reset detection or notification not available. |
| 210 uint32_t gl_reset_notification_strategy; | 206 uint32_t gl_reset_notification_strategy; |
| 211 | 207 |
| 212 // The device semantics, i.e. whether the Vista and Windows 7 specific | |
| 213 // semantics are available. | |
| 214 bool can_lose_context; | |
| 215 | |
| 216 bool software_rendering; | 208 bool software_rendering; |
| 217 | 209 |
| 218 // Whether the driver uses direct rendering. True on most platforms, false on | 210 // Whether the driver uses direct rendering. True on most platforms, false on |
| 219 // X11 when using remote X. | 211 // X11 when using remote X. |
| 220 bool direct_rendering; | 212 bool direct_rendering; |
| 221 | 213 |
| 222 // Whether the gpu process is running in a sandbox. | 214 // Whether the gpu process is running in a sandbox. |
| 223 bool sandboxed; | 215 bool sandboxed; |
| 224 | 216 |
| 225 // Number of GPU process crashes recorded. | 217 // Number of GPU process crashes recorded. |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 virtual ~Enumerator() {} | 279 virtual ~Enumerator() {} |
| 288 }; | 280 }; |
| 289 | 281 |
| 290 // Outputs the fields in this structure to the provided enumerator. | 282 // Outputs the fields in this structure to the provided enumerator. |
| 291 void EnumerateFields(Enumerator* enumerator) const; | 283 void EnumerateFields(Enumerator* enumerator) const; |
| 292 }; | 284 }; |
| 293 | 285 |
| 294 } // namespace gpu | 286 } // namespace gpu |
| 295 | 287 |
| 296 #endif // GPU_CONFIG_GPU_INFO_H_ | 288 #endif // GPU_CONFIG_GPU_INFO_H_ |
| OLD | NEW |