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 angle_pack_reverse_row_order(false), |
29 arb_texture_rectangle(false) { | 30 arb_texture_rectangle(false) { |
30 } | 31 } |
31 | 32 |
32 bool chromium_framebuffer_multisample; | 33 bool chromium_framebuffer_multisample; |
33 bool oes_standard_derivatives; | 34 bool oes_standard_derivatives; |
34 bool oes_egl_image_external; | 35 bool oes_egl_image_external; |
35 bool npot_ok; | 36 bool npot_ok; |
36 bool enable_texture_float_linear; | 37 bool enable_texture_float_linear; |
37 bool enable_texture_half_float_linear; | 38 bool enable_texture_half_float_linear; |
38 bool chromium_webglsl; | 39 bool chromium_webglsl; |
39 bool chromium_stream_texture; | 40 bool chromium_stream_texture; |
40 bool angle_translated_shader_source; | 41 bool angle_translated_shader_source; |
| 42 bool angle_pack_reverse_row_order; |
41 bool arb_texture_rectangle; | 43 bool arb_texture_rectangle; |
42 }; | 44 }; |
43 | 45 |
44 FeatureInfo(); | 46 FeatureInfo(); |
45 ~FeatureInfo(); | 47 ~FeatureInfo(); |
46 | 48 |
47 // If allowed features = NULL or "*", all features are allowed. Otherwise | 49 // If allowed features = NULL or "*", all features are allowed. Otherwise |
48 // only features that match the strings in allowed_features are allowed. | 50 // only features that match the strings in allowed_features are allowed. |
49 bool Initialize(const char* allowed_features); | 51 bool Initialize(const char* allowed_features); |
50 bool Initialize(const DisallowedFeatures& disallowed_features, | 52 bool Initialize(const DisallowedFeatures& disallowed_features, |
(...skipping 30 matching lines...) Expand all Loading... |
81 | 83 |
82 DISALLOW_COPY_AND_ASSIGN(FeatureInfo); | 84 DISALLOW_COPY_AND_ASSIGN(FeatureInfo); |
83 }; | 85 }; |
84 | 86 |
85 } // namespace gles2 | 87 } // namespace gles2 |
86 } // namespace gpu | 88 } // namespace gpu |
87 | 89 |
88 #endif // GPU_COMMAND_BUFFER_SERVICE_FEATURE_INFO_H_ | 90 #endif // GPU_COMMAND_BUFFER_SERVICE_FEATURE_INFO_H_ |
89 | 91 |
90 | 92 |
OLD | NEW |