| 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 { | 149 bool IsES3Enabled() const { |
| 150 return unsafe_es3_apis_enabled_; | 150 return es3_apis_enabled_; |
| 151 } |
| 152 |
| 153 // TODO(yunchao): This is a workaround to make gpu_unittests pass. |
| 154 // Will fix it later. |
| 155 void SetES3APIsSwitch(bool enabled) { |
| 156 enable_es3_apis_switch_ = enabled; |
| 157 } |
| 158 |
| 159 bool GetES3APIsSwitch() const { |
| 160 return enable_es3_apis_switch_; |
| 151 } | 161 } |
| 152 | 162 |
| 153 bool disable_shader_translator() const { return disable_shader_translator_; } | 163 bool disable_shader_translator() const { return disable_shader_translator_; } |
| 154 | 164 |
| 155 bool IsWebGLContext() const; | 165 bool IsWebGLContext() const; |
| 156 bool IsWebGL1OrES2Context() const; | 166 bool IsWebGL1OrES2Context() const; |
| 157 bool IsWebGL2OrES3Context() const; | 167 bool IsWebGL2OrES3Context() const; |
| 158 | 168 |
| 159 void EnableCHROMIUMColorBufferFloatRGBA(); | 169 void EnableCHROMIUMColorBufferFloatRGBA(); |
| 160 void EnableCHROMIUMColorBufferFloatRGB(); | 170 void EnableCHROMIUMColorBufferFloatRGB(); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 188 | 198 |
| 189 // The extensions string returned by glGetString(GL_EXTENSIONS); | 199 // The extensions string returned by glGetString(GL_EXTENSIONS); |
| 190 std::string extensions_; | 200 std::string extensions_; |
| 191 | 201 |
| 192 // Flags for some features | 202 // Flags for some features |
| 193 FeatureFlags feature_flags_; | 203 FeatureFlags feature_flags_; |
| 194 | 204 |
| 195 // Flags for Workarounds. | 205 // Flags for Workarounds. |
| 196 const GpuDriverBugWorkarounds workarounds_; | 206 const GpuDriverBugWorkarounds workarounds_; |
| 197 | 207 |
| 198 // Whether the command line switch kEnableUnsafeES3APIs is passed in. | 208 bool es3_apis_enabled_; |
| 199 bool enable_unsafe_es3_apis_switch_; | 209 bool enable_es3_apis_switch_; |
| 200 | |
| 201 bool unsafe_es3_apis_enabled_; | |
| 202 | 210 |
| 203 bool ext_color_buffer_float_available_; | 211 bool ext_color_buffer_float_available_; |
| 204 bool oes_texture_float_linear_available_; | 212 bool oes_texture_float_linear_available_; |
| 205 bool oes_texture_half_float_linear_available_; | 213 bool oes_texture_half_float_linear_available_; |
| 206 | 214 |
| 207 bool disable_shader_translator_; | 215 bool disable_shader_translator_; |
| 208 std::unique_ptr<gl::GLVersionInfo> gl_version_info_; | 216 std::unique_ptr<gl::GLVersionInfo> gl_version_info_; |
| 209 | 217 |
| 210 DISALLOW_COPY_AND_ASSIGN(FeatureInfo); | 218 DISALLOW_COPY_AND_ASSIGN(FeatureInfo); |
| 211 }; | 219 }; |
| 212 | 220 |
| 213 } // namespace gles2 | 221 } // namespace gles2 |
| 214 } // namespace gpu | 222 } // namespace gpu |
| 215 | 223 |
| 216 #endif // GPU_COMMAND_BUFFER_SERVICE_FEATURE_INFO_H_ | 224 #endif // GPU_COMMAND_BUFFER_SERVICE_FEATURE_INFO_H_ |
| OLD | NEW |