OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "gpu/command_buffer/service/gles2_cmd_decoder.h" | 9 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
10 #include "gpu/command_buffer/service/gles2_cmd_validation.h" | 10 #include "gpu/command_buffer/service/gles2_cmd_validation.h" |
11 | 11 |
12 namespace gpu { | 12 namespace gpu { |
13 namespace gles2 { | 13 namespace gles2 { |
14 | 14 |
15 // FeatureInfo records the features that are available for a particular context. | 15 // FeatureInfo records the features that are available for a particular context. |
16 class FeatureInfo { | 16 class FeatureInfo { |
17 public: | 17 public: |
18 struct FeatureFlags { | 18 struct FeatureFlags { |
19 FeatureFlags() | 19 FeatureFlags() |
20 : chromium_framebuffer_multisample(false), | 20 : chromium_framebuffer_multisample(false), |
21 oes_standard_derivatives(false), | 21 oes_standard_derivatives(false), |
22 oes_egl_image_external(false), | 22 oes_egl_image_external(false), |
23 npot_ok(false), | 23 npot_ok(false), |
24 enable_texture_float_linear(false), | 24 enable_texture_float_linear(false), |
25 enable_texture_half_float_linear(false), | 25 enable_texture_half_float_linear(false), |
26 chromium_webglsl(false), | 26 chromium_webglsl(false), |
27 chromium_stream_texture(false), | 27 chromium_stream_texture(false), |
28 angle_translated_shader_source(false) { | 28 angle_translated_shader_source(false), |
| 29 arb_texture_rectangle(false) { |
29 } | 30 } |
30 | 31 |
31 bool chromium_framebuffer_multisample; | 32 bool chromium_framebuffer_multisample; |
32 bool oes_standard_derivatives; | 33 bool oes_standard_derivatives; |
33 bool oes_egl_image_external; | 34 bool oes_egl_image_external; |
34 bool npot_ok; | 35 bool npot_ok; |
35 bool enable_texture_float_linear; | 36 bool enable_texture_float_linear; |
36 bool enable_texture_half_float_linear; | 37 bool enable_texture_half_float_linear; |
37 bool chromium_webglsl; | 38 bool chromium_webglsl; |
38 bool chromium_stream_texture; | 39 bool chromium_stream_texture; |
39 bool angle_translated_shader_source; | 40 bool angle_translated_shader_source; |
| 41 bool arb_texture_rectangle; |
40 }; | 42 }; |
41 | 43 |
42 FeatureInfo(); | 44 FeatureInfo(); |
43 ~FeatureInfo(); | 45 ~FeatureInfo(); |
44 | 46 |
45 // If allowed features = NULL or "*", all features are allowed. Otherwise | 47 // If allowed features = NULL or "*", all features are allowed. Otherwise |
46 // only features that match the strings in allowed_features are allowed. | 48 // only features that match the strings in allowed_features are allowed. |
47 bool Initialize(const char* allowed_features); | 49 bool Initialize(const char* allowed_features); |
48 bool Initialize(const DisallowedFeatures& disallowed_features, | 50 bool Initialize(const DisallowedFeatures& disallowed_features, |
49 const char* allowed_features); | 51 const char* allowed_features); |
(...skipping 29 matching lines...) Expand all Loading... |
79 | 81 |
80 DISALLOW_COPY_AND_ASSIGN(FeatureInfo); | 82 DISALLOW_COPY_AND_ASSIGN(FeatureInfo); |
81 }; | 83 }; |
82 | 84 |
83 } // namespace gles2 | 85 } // namespace gles2 |
84 } // namespace gpu | 86 } // namespace gpu |
85 | 87 |
86 #endif // GPU_COMMAND_BUFFER_SERVICE_FEATURE_INFO_H_ | 88 #endif // GPU_COMMAND_BUFFER_SERVICE_FEATURE_INFO_H_ |
87 | 89 |
88 | 90 |
OLD | NEW |