| 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; | 
|   25   bool polygon_offset_fill; |   27   bool polygon_offset_fill; | 
|   26   bool cached_polygon_offset_fill; |   28   bool cached_polygon_offset_fill; | 
|   27   bool sample_alpha_to_coverage; |   29   bool sample_alpha_to_coverage; | 
|   28   bool cached_sample_alpha_to_coverage; |   30   bool cached_sample_alpha_to_coverage; | 
|   29   bool sample_coverage; |   31   bool sample_coverage; | 
|   30   bool cached_sample_coverage; |   32   bool cached_sample_coverage; | 
|   31   bool scissor_test; |   33   bool scissor_test; | 
|   32   bool cached_scissor_test; |   34   bool cached_scissor_test; | 
|   33   bool stencil_test; |   35   bool stencil_test; | 
|   34   bool cached_stencil_test; |   36   bool cached_stencil_test; | 
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  136     case GL_DEPTH_TEST: |  138     case GL_DEPTH_TEST: | 
|  137       if (enable_flags.cached_depth_test == enable && !ignore_cached_state) |  139       if (enable_flags.cached_depth_test == enable && !ignore_cached_state) | 
|  138         return; |  140         return; | 
|  139       enable_flags.cached_depth_test = enable; |  141       enable_flags.cached_depth_test = enable; | 
|  140       break; |  142       break; | 
|  141     case GL_DITHER: |  143     case GL_DITHER: | 
|  142       if (enable_flags.cached_dither == enable && !ignore_cached_state) |  144       if (enable_flags.cached_dither == enable && !ignore_cached_state) | 
|  143         return; |  145         return; | 
|  144       enable_flags.cached_dither = enable; |  146       enable_flags.cached_dither = enable; | 
|  145       break; |  147       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; | 
|  146     case GL_POLYGON_OFFSET_FILL: |  154     case GL_POLYGON_OFFSET_FILL: | 
|  147       if (enable_flags.cached_polygon_offset_fill == enable && |  155       if (enable_flags.cached_polygon_offset_fill == enable && | 
|  148           !ignore_cached_state) |  156           !ignore_cached_state) | 
|  149         return; |  157         return; | 
|  150       enable_flags.cached_polygon_offset_fill = enable; |  158       enable_flags.cached_polygon_offset_fill = enable; | 
|  151       break; |  159       break; | 
|  152     case GL_SAMPLE_ALPHA_TO_COVERAGE: |  160     case GL_SAMPLE_ALPHA_TO_COVERAGE: | 
|  153       if (enable_flags.cached_sample_alpha_to_coverage == enable && |  161       if (enable_flags.cached_sample_alpha_to_coverage == enable && | 
|  154           !ignore_cached_state) |  162           !ignore_cached_state) | 
|  155         return; |  163         return; | 
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  196     default: |  204     default: | 
|  197       NOTREACHED(); |  205       NOTREACHED(); | 
|  198       return; |  206       return; | 
|  199   } |  207   } | 
|  200   if (enable) |  208   if (enable) | 
|  201     glEnable(cap); |  209     glEnable(cap); | 
|  202   else |  210   else | 
|  203     glDisable(cap); |  211     glDisable(cap); | 
|  204 } |  212 } | 
|  205 #endif  // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_AUTOGEN_H_ |  213 #endif  // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_AUTOGEN_H_ | 
| OLD | NEW |