Don't show supervised user as "already on this device" while they're being imported.
[chromium-blink-merge.git] / gpu / command_buffer / service / context_state_autogen.h
blobe2b65bf5d50001c5361ad5619f7dd7858b70aaa6
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
3 // found in the LICENSE file.
5 // This file is auto-generated from
6 // gpu/command_buffer/build_gles2_cmd_buffer.py
7 // It's formatted by clang-format using chromium coding style:
8 // clang-format -i -style=chromium filename
9 // DO NOT EDIT!
11 // It is included by context_state.h
12 #ifndef GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_AUTOGEN_H_
13 #define GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_AUTOGEN_H_
15 struct EnableFlags {
16 EnableFlags();
17 bool blend;
18 bool cached_blend;
19 bool cull_face;
20 bool cached_cull_face;
21 bool depth_test;
22 bool cached_depth_test;
23 bool dither;
24 bool cached_dither;
25 bool polygon_offset_fill;
26 bool cached_polygon_offset_fill;
27 bool sample_alpha_to_coverage;
28 bool cached_sample_alpha_to_coverage;
29 bool sample_coverage;
30 bool cached_sample_coverage;
31 bool scissor_test;
32 bool cached_scissor_test;
33 bool stencil_test;
34 bool cached_stencil_test;
35 bool rasterizer_discard;
36 bool cached_rasterizer_discard;
37 bool primitive_restart_fixed_index;
38 bool cached_primitive_restart_fixed_index;
41 GLfloat blend_color_red;
42 GLfloat blend_color_green;
43 GLfloat blend_color_blue;
44 GLfloat blend_color_alpha;
45 GLenum blend_equation_rgb;
46 GLenum blend_equation_alpha;
47 GLenum blend_source_rgb;
48 GLenum blend_dest_rgb;
49 GLenum blend_source_alpha;
50 GLenum blend_dest_alpha;
51 GLfloat color_clear_red;
52 GLfloat color_clear_green;
53 GLfloat color_clear_blue;
54 GLfloat color_clear_alpha;
55 GLclampf depth_clear;
56 GLint stencil_clear;
57 GLboolean color_mask_red;
58 GLboolean cached_color_mask_red;
59 GLboolean color_mask_green;
60 GLboolean cached_color_mask_green;
61 GLboolean color_mask_blue;
62 GLboolean cached_color_mask_blue;
63 GLboolean color_mask_alpha;
64 GLboolean cached_color_mask_alpha;
65 GLenum cull_mode;
66 GLenum depth_func;
67 GLboolean depth_mask;
68 GLboolean cached_depth_mask;
69 GLclampf z_near;
70 GLclampf z_far;
71 GLenum front_face;
72 GLenum hint_generate_mipmap;
73 GLenum hint_fragment_shader_derivative;
74 GLfloat line_width;
75 GLfloat modelview_matrix[16];
76 GLfloat projection_matrix[16];
77 GLint pack_alignment;
78 GLint unpack_alignment;
79 GLfloat polygon_offset_factor;
80 GLfloat polygon_offset_units;
81 GLclampf sample_coverage_value;
82 GLboolean sample_coverage_invert;
83 GLint scissor_x;
84 GLint scissor_y;
85 GLsizei scissor_width;
86 GLsizei scissor_height;
87 GLenum stencil_front_func;
88 GLint stencil_front_ref;
89 GLuint stencil_front_mask;
90 GLenum stencil_back_func;
91 GLint stencil_back_ref;
92 GLuint stencil_back_mask;
93 GLuint stencil_front_writemask;
94 GLuint cached_stencil_front_writemask;
95 GLuint stencil_back_writemask;
96 GLuint cached_stencil_back_writemask;
97 GLenum stencil_front_fail_op;
98 GLenum stencil_front_z_fail_op;
99 GLenum stencil_front_z_pass_op;
100 GLenum stencil_back_fail_op;
101 GLenum stencil_back_z_fail_op;
102 GLenum stencil_back_z_pass_op;
103 GLint viewport_x;
104 GLint viewport_y;
105 GLsizei viewport_width;
106 GLsizei viewport_height;
108 inline void SetDeviceCapabilityState(GLenum cap, bool enable) {
109 switch (cap) {
110 case GL_BLEND:
111 if (enable_flags.cached_blend == enable && !ignore_cached_state)
112 return;
113 enable_flags.cached_blend = enable;
114 break;
115 case GL_CULL_FACE:
116 if (enable_flags.cached_cull_face == enable && !ignore_cached_state)
117 return;
118 enable_flags.cached_cull_face = enable;
119 break;
120 case GL_DEPTH_TEST:
121 if (enable_flags.cached_depth_test == enable && !ignore_cached_state)
122 return;
123 enable_flags.cached_depth_test = enable;
124 break;
125 case GL_DITHER:
126 if (enable_flags.cached_dither == enable && !ignore_cached_state)
127 return;
128 enable_flags.cached_dither = enable;
129 break;
130 case GL_POLYGON_OFFSET_FILL:
131 if (enable_flags.cached_polygon_offset_fill == enable &&
132 !ignore_cached_state)
133 return;
134 enable_flags.cached_polygon_offset_fill = enable;
135 break;
136 case GL_SAMPLE_ALPHA_TO_COVERAGE:
137 if (enable_flags.cached_sample_alpha_to_coverage == enable &&
138 !ignore_cached_state)
139 return;
140 enable_flags.cached_sample_alpha_to_coverage = enable;
141 break;
142 case GL_SAMPLE_COVERAGE:
143 if (enable_flags.cached_sample_coverage == enable && !ignore_cached_state)
144 return;
145 enable_flags.cached_sample_coverage = enable;
146 break;
147 case GL_SCISSOR_TEST:
148 if (enable_flags.cached_scissor_test == enable && !ignore_cached_state)
149 return;
150 enable_flags.cached_scissor_test = enable;
151 break;
152 case GL_STENCIL_TEST:
153 if (enable_flags.cached_stencil_test == enable && !ignore_cached_state)
154 return;
155 enable_flags.cached_stencil_test = enable;
156 break;
157 case GL_RASTERIZER_DISCARD:
158 if (enable_flags.cached_rasterizer_discard == enable &&
159 !ignore_cached_state)
160 return;
161 enable_flags.cached_rasterizer_discard = enable;
162 break;
163 case GL_PRIMITIVE_RESTART_FIXED_INDEX:
164 if (enable_flags.cached_primitive_restart_fixed_index == enable &&
165 !ignore_cached_state)
166 return;
167 enable_flags.cached_primitive_restart_fixed_index = enable;
168 break;
169 default:
170 NOTREACHED();
171 return;
173 if (enable)
174 glEnable(cap);
175 else
176 glDisable(cap);
178 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_AUTOGEN_H_