| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 bool oes_standard_derivatives = false; | 46 bool oes_standard_derivatives = false; |
| 47 bool oes_egl_image_external = false; | 47 bool oes_egl_image_external = false; |
| 48 bool nv_egl_stream_consumer_external = false; | 48 bool nv_egl_stream_consumer_external = false; |
| 49 bool oes_depth24 = false; | 49 bool oes_depth24 = false; |
| 50 bool oes_compressed_etc1_rgb8_texture = false; | 50 bool oes_compressed_etc1_rgb8_texture = false; |
| 51 bool packed_depth24_stencil8 = false; | 51 bool packed_depth24_stencil8 = false; |
| 52 bool npot_ok = false; | 52 bool npot_ok = false; |
| 53 bool enable_texture_float_linear = false; | 53 bool enable_texture_float_linear = false; |
| 54 bool enable_texture_half_float_linear = false; | 54 bool enable_texture_half_float_linear = false; |
| 55 bool enable_color_buffer_float = false; | 55 bool enable_color_buffer_float = false; |
| 56 bool enable_color_buffer_half_float = false; |
| 56 bool angle_translated_shader_source = false; | 57 bool angle_translated_shader_source = false; |
| 57 bool angle_pack_reverse_row_order = false; | 58 bool angle_pack_reverse_row_order = false; |
| 58 bool arb_texture_rectangle = false; | 59 bool arb_texture_rectangle = false; |
| 59 bool angle_instanced_arrays = false; | 60 bool angle_instanced_arrays = false; |
| 60 bool occlusion_query = false; | 61 bool occlusion_query = false; |
| 61 bool occlusion_query_boolean = false; | 62 bool occlusion_query_boolean = false; |
| 62 bool use_arb_occlusion_query2_for_occlusion_query_boolean = false; | 63 bool use_arb_occlusion_query2_for_occlusion_query_boolean = false; |
| 63 bool use_arb_occlusion_query_for_occlusion_query_boolean = false; | 64 bool use_arb_occlusion_query_for_occlusion_query_boolean = false; |
| 64 bool native_vertex_array_object = false; | 65 bool native_vertex_array_object = false; |
| 65 bool ext_texture_format_astc = false; | 66 bool ext_texture_format_astc = false; |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 | 161 |
| 161 bool disable_shader_translator() const { return disable_shader_translator_; } | 162 bool disable_shader_translator() const { return disable_shader_translator_; } |
| 162 | 163 |
| 163 bool IsWebGLContext() const; | 164 bool IsWebGLContext() const; |
| 164 bool IsWebGL1OrES2Context() const; | 165 bool IsWebGL1OrES2Context() const; |
| 165 bool IsWebGL2OrES3Context() const; | 166 bool IsWebGL2OrES3Context() const; |
| 166 | 167 |
| 167 void EnableCHROMIUMColorBufferFloatRGBA(); | 168 void EnableCHROMIUMColorBufferFloatRGBA(); |
| 168 void EnableCHROMIUMColorBufferFloatRGB(); | 169 void EnableCHROMIUMColorBufferFloatRGB(); |
| 169 void EnableEXTColorBufferFloat(); | 170 void EnableEXTColorBufferFloat(); |
| 171 void EnableEXTColorBufferHalfFloat(); |
| 170 void EnableOESTextureFloatLinear(); | 172 void EnableOESTextureFloatLinear(); |
| 171 void EnableOESTextureHalfFloatLinear(); | 173 void EnableOESTextureHalfFloatLinear(); |
| 172 | 174 |
| 173 bool ext_color_buffer_float_available() const { | 175 bool ext_color_buffer_float_available() const { |
| 174 return ext_color_buffer_float_available_; | 176 return ext_color_buffer_float_available_; |
| 175 } | 177 } |
| 176 | 178 |
| 177 bool oes_texture_float_linear_available() const { | 179 bool oes_texture_float_linear_available() const { |
| 178 return oes_texture_float_linear_available_; | 180 return oes_texture_float_linear_available_; |
| 179 } | 181 } |
| 180 | 182 |
| 181 private: | 183 private: |
| 182 friend class base::RefCounted<FeatureInfo>; | 184 friend class base::RefCounted<FeatureInfo>; |
| 183 friend class BufferManagerClientSideArraysTest; | 185 friend class BufferManagerClientSideArraysTest; |
| 186 class StringSet; |
| 184 | 187 |
| 185 ~FeatureInfo(); | 188 ~FeatureInfo(); |
| 186 | 189 |
| 187 void AddExtensionString(const char* s); | 190 void AddExtensionString(const char* s); |
| 188 void InitializeBasicState(const base::CommandLine* command_line); | 191 void InitializeBasicState(const base::CommandLine* command_line); |
| 189 void InitializeFeatures(); | 192 void InitializeFeatures(); |
| 193 void InitializeFloatAndHalfFloatFeatures(const StringSet& extensions); |
| 190 | 194 |
| 191 Validators validators_; | 195 Validators validators_; |
| 192 | 196 |
| 193 DisallowedFeatures disallowed_features_; | 197 DisallowedFeatures disallowed_features_; |
| 194 | 198 |
| 195 ContextType context_type_; | 199 ContextType context_type_; |
| 196 | 200 |
| 197 // The extensions string returned by glGetString(GL_EXTENSIONS); | 201 // The extensions string returned by glGetString(GL_EXTENSIONS); |
| 198 std::string extensions_; | 202 std::string extensions_; |
| 199 | 203 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 210 bool disable_shader_translator_; | 214 bool disable_shader_translator_; |
| 211 std::unique_ptr<gl::GLVersionInfo> gl_version_info_; | 215 std::unique_ptr<gl::GLVersionInfo> gl_version_info_; |
| 212 | 216 |
| 213 DISALLOW_COPY_AND_ASSIGN(FeatureInfo); | 217 DISALLOW_COPY_AND_ASSIGN(FeatureInfo); |
| 214 }; | 218 }; |
| 215 | 219 |
| 216 } // namespace gles2 | 220 } // namespace gles2 |
| 217 } // namespace gpu | 221 } // namespace gpu |
| 218 | 222 |
| 219 #endif // GPU_COMMAND_BUFFER_SERVICE_FEATURE_INFO_H_ | 223 #endif // GPU_COMMAND_BUFFER_SERVICE_FEATURE_INFO_H_ |
| OLD | NEW |