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 return disallowed_features_; | 137 return disallowed_features_; |
138 } | 138 } |
139 | 139 |
140 const gl::GLVersionInfo& gl_version_info() const { | 140 const gl::GLVersionInfo& gl_version_info() const { |
141 DCHECK(gl_version_info_.get()); | 141 DCHECK(gl_version_info_.get()); |
142 return *(gl_version_info_.get()); | 142 return *(gl_version_info_.get()); |
143 } | 143 } |
144 | 144 |
145 bool IsES3Capable() const; | 145 bool IsES3Capable() const; |
146 void EnableES3Validators(); | 146 void EnableES3Validators(); |
| 147 void EnableES3ValidatorsForTesting(); |
147 | 148 |
148 bool IsES3Enabled() const { | 149 bool IsES3Enabled() const { |
149 return unsafe_es3_apis_enabled_; | 150 return unsafe_es3_apis_enabled_; |
150 } | 151 } |
151 | 152 |
152 bool disable_shader_translator() const { return disable_shader_translator_; } | 153 bool disable_shader_translator() const { return disable_shader_translator_; } |
153 | 154 |
154 bool IsWebGLContext() const; | 155 bool IsWebGLContext() const; |
155 bool IsWebGL1OrES2Context() const; | 156 bool IsWebGL1OrES2Context() const; |
156 bool IsWebGL2OrES3Context() const; | 157 bool IsWebGL2OrES3Context() const; |
(...skipping 26 matching lines...) Expand all Loading... |
183 // Flags for some features | 184 // Flags for some features |
184 FeatureFlags feature_flags_; | 185 FeatureFlags feature_flags_; |
185 | 186 |
186 // Flags for Workarounds. | 187 // Flags for Workarounds. |
187 const GpuDriverBugWorkarounds workarounds_; | 188 const GpuDriverBugWorkarounds workarounds_; |
188 | 189 |
189 // Whether the command line switch kEnableUnsafeES3APIs is passed in. | 190 // Whether the command line switch kEnableUnsafeES3APIs is passed in. |
190 bool enable_unsafe_es3_apis_switch_; | 191 bool enable_unsafe_es3_apis_switch_; |
191 | 192 |
192 bool unsafe_es3_apis_enabled_; | 193 bool unsafe_es3_apis_enabled_; |
| 194 bool testing_es3_apis_enabled_ = false; |
193 | 195 |
194 bool ext_color_buffer_float_available_; | 196 bool ext_color_buffer_float_available_; |
195 bool oes_texture_float_linear_available_; | 197 bool oes_texture_float_linear_available_; |
196 bool oes_texture_half_float_linear_available_; | 198 bool oes_texture_half_float_linear_available_; |
197 | 199 |
198 bool disable_shader_translator_; | 200 bool disable_shader_translator_; |
199 std::unique_ptr<gl::GLVersionInfo> gl_version_info_; | 201 std::unique_ptr<gl::GLVersionInfo> gl_version_info_; |
200 | 202 |
201 DISALLOW_COPY_AND_ASSIGN(FeatureInfo); | 203 DISALLOW_COPY_AND_ASSIGN(FeatureInfo); |
202 }; | 204 }; |
203 | 205 |
204 } // namespace gles2 | 206 } // namespace gles2 |
205 } // namespace gpu | 207 } // namespace gpu |
206 | 208 |
207 #endif // GPU_COMMAND_BUFFER_SERVICE_FEATURE_INFO_H_ | 209 #endif // GPU_COMMAND_BUFFER_SERVICE_FEATURE_INFO_H_ |
OLD | NEW |