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 <string> | 8 #include <string> |
9 #include "base/hash_tables.h" | 9 #include "base/hash_tables.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 struct FeatureFlags { | 24 struct FeatureFlags { |
25 FeatureFlags(); | 25 FeatureFlags(); |
26 | 26 |
27 bool chromium_framebuffer_multisample; | 27 bool chromium_framebuffer_multisample; |
28 bool oes_standard_derivatives; | 28 bool oes_standard_derivatives; |
29 bool oes_egl_image_external; | 29 bool oes_egl_image_external; |
30 bool npot_ok; | 30 bool npot_ok; |
31 bool enable_texture_float_linear; | 31 bool enable_texture_float_linear; |
32 bool enable_texture_half_float_linear; | 32 bool enable_texture_half_float_linear; |
33 bool chromium_webglsl; | |
34 bool chromium_stream_texture; | 33 bool chromium_stream_texture; |
35 bool angle_translated_shader_source; | 34 bool angle_translated_shader_source; |
36 bool angle_pack_reverse_row_order; | 35 bool angle_pack_reverse_row_order; |
37 bool arb_texture_rectangle; | 36 bool arb_texture_rectangle; |
38 bool angle_instanced_arrays; | 37 bool angle_instanced_arrays; |
39 bool occlusion_query_boolean; | 38 bool occlusion_query_boolean; |
40 bool use_arb_occlusion_query2_for_occlusion_query_boolean; | 39 bool use_arb_occlusion_query2_for_occlusion_query_boolean; |
41 bool use_arb_occlusion_query_for_occlusion_query_boolean; | 40 bool use_arb_occlusion_query_for_occlusion_query_boolean; |
42 bool native_vertex_array_object; | 41 bool native_vertex_array_object; |
43 bool disable_workarounds; | 42 bool disable_workarounds; |
(...skipping 17 matching lines...) Expand all Loading... |
61 }; | 60 }; |
62 | 61 |
63 FeatureInfo(); | 62 FeatureInfo(); |
64 | 63 |
65 // If allowed features = NULL or "*", all features are allowed. Otherwise | 64 // If allowed features = NULL or "*", all features are allowed. Otherwise |
66 // only features that match the strings in allowed_features are allowed. | 65 // only features that match the strings in allowed_features are allowed. |
67 bool Initialize(const char* allowed_features); | 66 bool Initialize(const char* allowed_features); |
68 bool Initialize(const DisallowedFeatures& disallowed_features, | 67 bool Initialize(const DisallowedFeatures& disallowed_features, |
69 const char* allowed_features); | 68 const char* allowed_features); |
70 | 69 |
71 // Turns on certain features if they can be turned on. NULL turns on | 70 // Turns on certain features if they can be turned on. |
72 // all available features. | 71 void AddFeatures(); |
73 void AddFeatures(const char* desired_features); | |
74 | 72 |
75 const Validators* validators() const { | 73 const Validators* validators() const { |
76 return &validators_; | 74 return &validators_; |
77 } | 75 } |
78 | 76 |
79 const ValueValidator<GLenum>& GetTextureFormatValidator(GLenum format) { | 77 const ValueValidator<GLenum>& GetTextureFormatValidator(GLenum format) { |
80 return texture_format_validators_[format]; | 78 return texture_format_validators_[format]; |
81 } | 79 } |
82 | 80 |
83 const std::string& extensions() const { | 81 const std::string& extensions() const { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 // Flags for Workarounds. | 113 // Flags for Workarounds. |
116 Workarounds workarounds_; | 114 Workarounds workarounds_; |
117 | 115 |
118 DISALLOW_COPY_AND_ASSIGN(FeatureInfo); | 116 DISALLOW_COPY_AND_ASSIGN(FeatureInfo); |
119 }; | 117 }; |
120 | 118 |
121 } // namespace gles2 | 119 } // namespace gles2 |
122 } // namespace gpu | 120 } // namespace gpu |
123 | 121 |
124 #endif // GPU_COMMAND_BUFFER_SERVICE_FEATURE_INFO_H_ | 122 #endif // GPU_COMMAND_BUFFER_SERVICE_FEATURE_INFO_H_ |
OLD | NEW |