| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // This file is auto-generated from | 5 // This file is auto-generated from |
| 6 // gpu/command_buffer/build_gles2_cmd_buffer.py | 6 // gpu/command_buffer/build_gles2_cmd_buffer.py |
| 7 // It's formatted by clang-format using chromium coding style: | 7 // It's formatted by clang-format using chromium coding style: |
| 8 // clang-format -i -style=chromium filename | 8 // clang-format -i -style=chromium filename |
| 9 // DO NOT EDIT! | 9 // DO NOT EDIT! |
| 10 | 10 |
| 11 // It is included by context_state.h | 11 // It is included by context_state.h |
| 12 #ifndef GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_AUTOGEN_H_ | 12 #ifndef GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_AUTOGEN_H_ |
| 13 #define GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_AUTOGEN_H_ | 13 #define GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_AUTOGEN_H_ |
| 14 | 14 |
| 15 struct EnableFlags { | 15 struct EnableFlags { |
| 16 EnableFlags(); | 16 EnableFlags(); |
| 17 bool blend; | 17 bool blend; |
| 18 bool cached_blend; | 18 bool cached_blend; |
| 19 bool cull_face; | 19 bool cull_face; |
| 20 bool cached_cull_face; | 20 bool cached_cull_face; |
| 21 bool depth_test; | 21 bool depth_test; |
| 22 bool cached_depth_test; | 22 bool cached_depth_test; |
| 23 bool dither; | 23 bool dither; |
| 24 bool cached_dither; | 24 bool cached_dither; |
| 25 bool framebuffer_srgb_ext; | |
| 26 bool cached_framebuffer_srgb_ext; | |
| 27 bool polygon_offset_fill; | 25 bool polygon_offset_fill; |
| 28 bool cached_polygon_offset_fill; | 26 bool cached_polygon_offset_fill; |
| 29 bool sample_alpha_to_coverage; | 27 bool sample_alpha_to_coverage; |
| 30 bool cached_sample_alpha_to_coverage; | 28 bool cached_sample_alpha_to_coverage; |
| 31 bool sample_coverage; | 29 bool sample_coverage; |
| 32 bool cached_sample_coverage; | 30 bool cached_sample_coverage; |
| 33 bool scissor_test; | 31 bool scissor_test; |
| 34 bool cached_scissor_test; | 32 bool cached_scissor_test; |
| 35 bool stencil_test; | 33 bool stencil_test; |
| 36 bool cached_stencil_test; | 34 bool cached_stencil_test; |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 case GL_DEPTH_TEST: | 136 case GL_DEPTH_TEST: |
| 139 if (enable_flags.cached_depth_test == enable && !ignore_cached_state) | 137 if (enable_flags.cached_depth_test == enable && !ignore_cached_state) |
| 140 return; | 138 return; |
| 141 enable_flags.cached_depth_test = enable; | 139 enable_flags.cached_depth_test = enable; |
| 142 break; | 140 break; |
| 143 case GL_DITHER: | 141 case GL_DITHER: |
| 144 if (enable_flags.cached_dither == enable && !ignore_cached_state) | 142 if (enable_flags.cached_dither == enable && !ignore_cached_state) |
| 145 return; | 143 return; |
| 146 enable_flags.cached_dither = enable; | 144 enable_flags.cached_dither = enable; |
| 147 break; | 145 break; |
| 148 case GL_FRAMEBUFFER_SRGB_EXT: | |
| 149 if (enable_flags.cached_framebuffer_srgb_ext == enable && | |
| 150 !ignore_cached_state) | |
| 151 return; | |
| 152 enable_flags.cached_framebuffer_srgb_ext = enable; | |
| 153 break; | |
| 154 case GL_POLYGON_OFFSET_FILL: | 146 case GL_POLYGON_OFFSET_FILL: |
| 155 if (enable_flags.cached_polygon_offset_fill == enable && | 147 if (enable_flags.cached_polygon_offset_fill == enable && |
| 156 !ignore_cached_state) | 148 !ignore_cached_state) |
| 157 return; | 149 return; |
| 158 enable_flags.cached_polygon_offset_fill = enable; | 150 enable_flags.cached_polygon_offset_fill = enable; |
| 159 break; | 151 break; |
| 160 case GL_SAMPLE_ALPHA_TO_COVERAGE: | 152 case GL_SAMPLE_ALPHA_TO_COVERAGE: |
| 161 if (enable_flags.cached_sample_alpha_to_coverage == enable && | 153 if (enable_flags.cached_sample_alpha_to_coverage == enable && |
| 162 !ignore_cached_state) | 154 !ignore_cached_state) |
| 163 return; | 155 return; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 default: | 196 default: |
| 205 NOTREACHED(); | 197 NOTREACHED(); |
| 206 return; | 198 return; |
| 207 } | 199 } |
| 208 if (enable) | 200 if (enable) |
| 209 glEnable(cap); | 201 glEnable(cap); |
| 210 else | 202 else |
| 211 glDisable(cap); | 203 glDisable(cap); |
| 212 } | 204 } |
| 213 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_AUTOGEN_H_ | 205 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_AUTOGEN_H_ |
| OLD | NEW |