| 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 } | 139 } |
| 140 | 140 |
| 141 const gl::GLVersionInfo& gl_version_info() const { | 141 const gl::GLVersionInfo& gl_version_info() const { |
| 142 DCHECK(gl_version_info_.get()); | 142 DCHECK(gl_version_info_.get()); |
| 143 return *(gl_version_info_.get()); | 143 return *(gl_version_info_.get()); |
| 144 } | 144 } |
| 145 | 145 |
| 146 bool IsES3Capable() const; | 146 bool IsES3Capable() const; |
| 147 void EnableES3Validators(); | 147 void EnableES3Validators(); |
| 148 | 148 |
| 149 bool IsES3Enabled() const { | |
| 150 return unsafe_es3_apis_enabled_; | |
| 151 } | |
| 152 | |
| 153 bool disable_shader_translator() const { return disable_shader_translator_; } | 149 bool disable_shader_translator() const { return disable_shader_translator_; } |
| 154 | 150 |
| 155 bool IsWebGLContext() const; | 151 bool IsWebGLContext() const; |
| 156 bool IsWebGL1OrES2Context() const; | 152 bool IsWebGL1OrES2Context() const; |
| 157 bool IsWebGL2OrES3Context() const; | 153 bool IsWebGL2OrES3Context() const; |
| 158 | 154 |
| 159 void EnableCHROMIUMColorBufferFloatRGBA(); | 155 void EnableCHROMIUMColorBufferFloatRGBA(); |
| 160 void EnableCHROMIUMColorBufferFloatRGB(); | 156 void EnableCHROMIUMColorBufferFloatRGB(); |
| 161 void EnableEXTColorBufferFloat(); | 157 void EnableEXTColorBufferFloat(); |
| 162 void EnableOESTextureFloatLinear(); | 158 void EnableOESTextureFloatLinear(); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 188 | 184 |
| 189 // The extensions string returned by glGetString(GL_EXTENSIONS); | 185 // The extensions string returned by glGetString(GL_EXTENSIONS); |
| 190 std::string extensions_; | 186 std::string extensions_; |
| 191 | 187 |
| 192 // Flags for some features | 188 // Flags for some features |
| 193 FeatureFlags feature_flags_; | 189 FeatureFlags feature_flags_; |
| 194 | 190 |
| 195 // Flags for Workarounds. | 191 // Flags for Workarounds. |
| 196 const GpuDriverBugWorkarounds workarounds_; | 192 const GpuDriverBugWorkarounds workarounds_; |
| 197 | 193 |
| 198 // Whether the command line switch kEnableUnsafeES3APIs is passed in. | |
| 199 bool enable_unsafe_es3_apis_switch_; | |
| 200 | |
| 201 bool unsafe_es3_apis_enabled_; | |
| 202 | |
| 203 bool ext_color_buffer_float_available_; | 194 bool ext_color_buffer_float_available_; |
| 204 bool oes_texture_float_linear_available_; | 195 bool oes_texture_float_linear_available_; |
| 205 bool oes_texture_half_float_linear_available_; | 196 bool oes_texture_half_float_linear_available_; |
| 206 | 197 |
| 207 bool disable_shader_translator_; | 198 bool disable_shader_translator_; |
| 208 std::unique_ptr<gl::GLVersionInfo> gl_version_info_; | 199 std::unique_ptr<gl::GLVersionInfo> gl_version_info_; |
| 209 | 200 |
| 210 DISALLOW_COPY_AND_ASSIGN(FeatureInfo); | 201 DISALLOW_COPY_AND_ASSIGN(FeatureInfo); |
| 211 }; | 202 }; |
| 212 | 203 |
| 213 } // namespace gles2 | 204 } // namespace gles2 |
| 214 } // namespace gpu | 205 } // namespace gpu |
| 215 | 206 |
| 216 #endif // GPU_COMMAND_BUFFER_SERVICE_FEATURE_INFO_H_ | 207 #endif // GPU_COMMAND_BUFFER_SERVICE_FEATURE_INFO_H_ |
| OLD | NEW |