| 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_COMMAND_BUFFER_SERVICE_FEATURE_INFO_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_FEATURE_INFO_H_ |
| 6 #define GPU_COMMAND_BUFFER_SERVICE_FEATURE_INFO_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_FEATURE_INFO_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 | 137 |
| 138 const gl::GLVersionInfo& gl_version_info() const { | 138 const gl::GLVersionInfo& gl_version_info() const { |
| 139 DCHECK(gl_version_info_.get()); | 139 DCHECK(gl_version_info_.get()); |
| 140 return *(gl_version_info_.get()); | 140 return *(gl_version_info_.get()); |
| 141 } | 141 } |
| 142 | 142 |
| 143 bool IsES3Capable() const; | 143 bool IsES3Capable() const; |
| 144 void EnableES3Validators(); | 144 void EnableES3Validators(); |
| 145 | 145 |
| 146 bool IsES3Enabled() const { | 146 bool IsES3Enabled() const { |
| 147 return unsafe_es3_apis_enabled_; | 147 return es3_apis_enabled_; |
| 148 } |
| 149 |
| 150 void SetES3APIsSwitch(bool enabled) { |
| 151 enable_es3_apis_switch_ = enabled; |
| 152 } |
| 153 |
| 154 bool GetES3APIsSwitch() const { |
| 155 return enable_es3_apis_switch_; |
| 148 } | 156 } |
| 149 | 157 |
| 150 bool disable_shader_translator() const { return disable_shader_translator_; } | 158 bool disable_shader_translator() const { return disable_shader_translator_; } |
| 151 | 159 |
| 152 bool IsWebGLContext() const; | 160 bool IsWebGLContext() const; |
| 153 bool IsWebGL1OrES2Context() const; | 161 bool IsWebGL1OrES2Context() const; |
| 154 bool IsWebGL2OrES3Context() const; | 162 bool IsWebGL2OrES3Context() const; |
| 155 | 163 |
| 156 void EnableCHROMIUMColorBufferFloatRGBA(); | 164 void EnableCHROMIUMColorBufferFloatRGBA(); |
| 157 void EnableCHROMIUMColorBufferFloatRGB(); | 165 void EnableCHROMIUMColorBufferFloatRGB(); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 186 // The extensions string returned by glGetString(GL_EXTENSIONS); | 194 // The extensions string returned by glGetString(GL_EXTENSIONS); |
| 187 std::string extensions_; | 195 std::string extensions_; |
| 188 | 196 |
| 189 // Flags for some features | 197 // Flags for some features |
| 190 FeatureFlags feature_flags_; | 198 FeatureFlags feature_flags_; |
| 191 | 199 |
| 192 // Flags for Workarounds. | 200 // Flags for Workarounds. |
| 193 const GpuDriverBugWorkarounds workarounds_; | 201 const GpuDriverBugWorkarounds workarounds_; |
| 194 | 202 |
| 195 // Whether the command line switch kEnableUnsafeES3APIs is passed in. | 203 // Whether the command line switch kEnableUnsafeES3APIs is passed in. |
| 196 bool enable_unsafe_es3_apis_switch_; | 204 // bool enable_unsafe_es3_apis_switch_; |
| 197 | 205 |
| 198 bool unsafe_es3_apis_enabled_; | 206 bool es3_apis_enabled_; |
| 207 bool enable_es3_apis_switch_; |
| 199 | 208 |
| 200 bool chromium_color_buffer_float_rgba_available_; | 209 bool chromium_color_buffer_float_rgba_available_; |
| 201 bool chromium_color_buffer_float_rgb_available_; | 210 bool chromium_color_buffer_float_rgb_available_; |
| 202 bool ext_color_buffer_float_available_; | 211 bool ext_color_buffer_float_available_; |
| 203 bool oes_texture_float_linear_available_; | 212 bool oes_texture_float_linear_available_; |
| 204 bool oes_texture_half_float_linear_available_; | 213 bool oes_texture_half_float_linear_available_; |
| 205 | 214 |
| 206 bool disable_shader_translator_; | 215 bool disable_shader_translator_; |
| 207 std::unique_ptr<gl::GLVersionInfo> gl_version_info_; | 216 std::unique_ptr<gl::GLVersionInfo> gl_version_info_; |
| 208 | 217 |
| 209 DISALLOW_COPY_AND_ASSIGN(FeatureInfo); | 218 DISALLOW_COPY_AND_ASSIGN(FeatureInfo); |
| 210 }; | 219 }; |
| 211 | 220 |
| 212 } // namespace gles2 | 221 } // namespace gles2 |
| 213 } // namespace gpu | 222 } // namespace gpu |
| 214 | 223 |
| 215 #endif // GPU_COMMAND_BUFFER_SERVICE_FEATURE_INFO_H_ | 224 #endif // GPU_COMMAND_BUFFER_SERVICE_FEATURE_INFO_H_ |
| OLD | NEW |