| 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 client_context_state.cc | 11 // It is included by client_context_state.cc |
| 12 #ifndef GPU_COMMAND_BUFFER_CLIENT_CLIENT_CONTEXT_STATE_IMPL_AUTOGEN_H_ | 12 #ifndef GPU_COMMAND_BUFFER_CLIENT_CLIENT_CONTEXT_STATE_IMPL_AUTOGEN_H_ |
| 13 #define GPU_COMMAND_BUFFER_CLIENT_CLIENT_CONTEXT_STATE_IMPL_AUTOGEN_H_ | 13 #define GPU_COMMAND_BUFFER_CLIENT_CLIENT_CONTEXT_STATE_IMPL_AUTOGEN_H_ |
| 14 | 14 |
| 15 ClientContextState::EnableFlags::EnableFlags() | 15 ClientContextState::EnableFlags::EnableFlags() |
| 16 : blend(false), | 16 : blend(false), |
| 17 cull_face(false), | 17 cull_face(false), |
| 18 depth_test(false), | 18 depth_test(false), |
| 19 dither(true), | 19 dither(true), |
| 20 polygon_offset_fill(false), | 20 polygon_offset_fill(false), |
| 21 sample_alpha_to_coverage(false), | 21 sample_alpha_to_coverage(false), |
| 22 sample_coverage(false), | 22 sample_coverage(false), |
| 23 scissor_test(false), | 23 scissor_test(false), |
| 24 stencil_test(false) { | 24 stencil_test(false), |
| 25 primitive_restart_fixed_index(false), |
| 26 rasterizer_discard(false) { |
| 25 } | 27 } |
| 26 | 28 |
| 27 bool ClientContextState::SetCapabilityState(GLenum cap, | 29 bool ClientContextState::SetCapabilityState(GLenum cap, |
| 28 bool enabled, | 30 bool enabled, |
| 29 bool* changed) { | 31 bool* changed) { |
| 30 *changed = false; | 32 *changed = false; |
| 31 switch (cap) { | 33 switch (cap) { |
| 32 case GL_BLEND: | 34 case GL_BLEND: |
| 33 if (enable_flags.blend != enabled) { | 35 if (enable_flags.blend != enabled) { |
| 34 *changed = true; | 36 *changed = true; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 *changed = true; | 78 *changed = true; |
| 77 enable_flags.scissor_test = enabled; | 79 enable_flags.scissor_test = enabled; |
| 78 } | 80 } |
| 79 return true; | 81 return true; |
| 80 case GL_STENCIL_TEST: | 82 case GL_STENCIL_TEST: |
| 81 if (enable_flags.stencil_test != enabled) { | 83 if (enable_flags.stencil_test != enabled) { |
| 82 *changed = true; | 84 *changed = true; |
| 83 enable_flags.stencil_test = enabled; | 85 enable_flags.stencil_test = enabled; |
| 84 } | 86 } |
| 85 return true; | 87 return true; |
| 88 case GL_PRIMITIVE_RESTART_FIXED_INDEX: |
| 89 if (enable_flags.primitive_restart_fixed_index != enabled) { |
| 90 *changed = true; |
| 91 enable_flags.primitive_restart_fixed_index = enabled; |
| 92 } |
| 93 return true; |
| 94 case GL_RASTERIZER_DISCARD: |
| 95 if (enable_flags.rasterizer_discard != enabled) { |
| 96 *changed = true; |
| 97 enable_flags.rasterizer_discard = enabled; |
| 98 } |
| 99 return true; |
| 86 default: | 100 default: |
| 87 return false; | 101 return false; |
| 88 } | 102 } |
| 89 } | 103 } |
| 90 bool ClientContextState::GetEnabled(GLenum cap, bool* enabled) const { | 104 bool ClientContextState::GetEnabled(GLenum cap, bool* enabled) const { |
| 91 switch (cap) { | 105 switch (cap) { |
| 92 case GL_BLEND: | 106 case GL_BLEND: |
| 93 *enabled = enable_flags.blend; | 107 *enabled = enable_flags.blend; |
| 94 return true; | 108 return true; |
| 95 case GL_CULL_FACE: | 109 case GL_CULL_FACE: |
| (...skipping 13 matching lines...) Expand all Loading... |
| 109 return true; | 123 return true; |
| 110 case GL_SAMPLE_COVERAGE: | 124 case GL_SAMPLE_COVERAGE: |
| 111 *enabled = enable_flags.sample_coverage; | 125 *enabled = enable_flags.sample_coverage; |
| 112 return true; | 126 return true; |
| 113 case GL_SCISSOR_TEST: | 127 case GL_SCISSOR_TEST: |
| 114 *enabled = enable_flags.scissor_test; | 128 *enabled = enable_flags.scissor_test; |
| 115 return true; | 129 return true; |
| 116 case GL_STENCIL_TEST: | 130 case GL_STENCIL_TEST: |
| 117 *enabled = enable_flags.stencil_test; | 131 *enabled = enable_flags.stencil_test; |
| 118 return true; | 132 return true; |
| 133 case GL_PRIMITIVE_RESTART_FIXED_INDEX: |
| 134 *enabled = enable_flags.primitive_restart_fixed_index; |
| 135 return true; |
| 136 case GL_RASTERIZER_DISCARD: |
| 137 *enabled = enable_flags.rasterizer_discard; |
| 138 return true; |
| 119 default: | 139 default: |
| 120 return false; | 140 return false; |
| 121 } | 141 } |
| 122 } | 142 } |
| 123 #endif // GPU_COMMAND_BUFFER_CLIENT_CLIENT_CONTEXT_STATE_IMPL_AUTOGEN_H_ | 143 #endif // GPU_COMMAND_BUFFER_CLIENT_CLIENT_CONTEXT_STATE_IMPL_AUTOGEN_H_ |
| OLD | NEW |