Don't add an aura tooltip to bubble close buttons on Windows.
[chromium-blink-merge.git] / gpu / command_buffer / service / context_state_autogen.h
blob405addd68f6c0ad6c1683eeef8eabce4722a9272
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;
39 GLfloat blend_color_red;
40 GLfloat blend_color_green;
41 GLfloat blend_color_blue;
42 GLfloat blend_color_alpha;
43 GLenum blend_equation_rgb;
44 GLenum blend_equation_alpha;
45 GLenum blend_source_rgb;
46 GLenum blend_dest_rgb;
47 GLenum blend_source_alpha;
48 GLenum blend_dest_alpha;
49 GLfloat color_clear_red;
50 GLfloat color_clear_green;
51 GLfloat color_clear_blue;
52 GLfloat color_clear_alpha;
53 GLclampf depth_clear;
54 GLint stencil_clear;
55 GLboolean color_mask_red;
56 GLboolean cached_color_mask_red;
57 GLboolean color_mask_green;
58 GLboolean cached_color_mask_green;
59 GLboolean color_mask_blue;
60 GLboolean cached_color_mask_blue;
61 GLboolean color_mask_alpha;
62 GLboolean cached_color_mask_alpha;
63 GLenum cull_mode;
64 GLenum depth_func;
65 GLboolean depth_mask;
66 GLboolean cached_depth_mask;
67 GLclampf z_near;
68 GLclampf z_far;
69 GLenum front_face;
70 GLenum hint_generate_mipmap;
71 GLenum hint_fragment_shader_derivative;
72 GLfloat line_width;
73 GLfloat modelview_matrix[16];
74 GLfloat projection_matrix[16];
75 GLint pack_alignment;
76 GLint unpack_alignment;
77 GLfloat polygon_offset_factor;
78 GLfloat polygon_offset_units;
79 GLclampf sample_coverage_value;
80 GLboolean sample_coverage_invert;
81 GLint scissor_x;
82 GLint scissor_y;
83 GLsizei scissor_width;
84 GLsizei scissor_height;
85 GLenum stencil_front_func;
86 GLint stencil_front_ref;
87 GLuint stencil_front_mask;
88 GLenum stencil_back_func;
89 GLint stencil_back_ref;
90 GLuint stencil_back_mask;
91 GLuint stencil_front_writemask;
92 GLuint cached_stencil_front_writemask;
93 GLuint stencil_back_writemask;
94 GLuint cached_stencil_back_writemask;
95 GLenum stencil_front_fail_op;
96 GLenum stencil_front_z_fail_op;
97 GLenum stencil_front_z_pass_op;
98 GLenum stencil_back_fail_op;
99 GLenum stencil_back_z_fail_op;
100 GLenum stencil_back_z_pass_op;
101 GLint viewport_x;
102 GLint viewport_y;
103 GLsizei viewport_width;
104 GLsizei viewport_height;
106 inline void SetDeviceCapabilityState(GLenum cap, bool enable) {
107 switch (cap) {
108 case GL_BLEND:
109 if (enable_flags.cached_blend == enable && !ignore_cached_state)
110 return;
111 enable_flags.cached_blend = enable;
112 break;
113 case GL_CULL_FACE:
114 if (enable_flags.cached_cull_face == enable && !ignore_cached_state)
115 return;
116 enable_flags.cached_cull_face = enable;
117 break;
118 case GL_DEPTH_TEST:
119 if (enable_flags.cached_depth_test == enable && !ignore_cached_state)
120 return;
121 enable_flags.cached_depth_test = enable;
122 break;
123 case GL_DITHER:
124 if (enable_flags.cached_dither == enable && !ignore_cached_state)
125 return;
126 enable_flags.cached_dither = enable;
127 break;
128 case GL_POLYGON_OFFSET_FILL:
129 if (enable_flags.cached_polygon_offset_fill == enable &&
130 !ignore_cached_state)
131 return;
132 enable_flags.cached_polygon_offset_fill = enable;
133 break;
134 case GL_SAMPLE_ALPHA_TO_COVERAGE:
135 if (enable_flags.cached_sample_alpha_to_coverage == enable &&
136 !ignore_cached_state)
137 return;
138 enable_flags.cached_sample_alpha_to_coverage = enable;
139 break;
140 case GL_SAMPLE_COVERAGE:
141 if (enable_flags.cached_sample_coverage == enable && !ignore_cached_state)
142 return;
143 enable_flags.cached_sample_coverage = enable;
144 break;
145 case GL_SCISSOR_TEST:
146 if (enable_flags.cached_scissor_test == enable && !ignore_cached_state)
147 return;
148 enable_flags.cached_scissor_test = enable;
149 break;
150 case GL_STENCIL_TEST:
151 if (enable_flags.cached_stencil_test == enable && !ignore_cached_state)
152 return;
153 enable_flags.cached_stencil_test = enable;
154 break;
155 case GL_RASTERIZER_DISCARD:
156 if (enable_flags.cached_rasterizer_discard == enable &&
157 !ignore_cached_state)
158 return;
159 enable_flags.cached_rasterizer_discard = enable;
160 break;
161 default:
162 NOTREACHED();
163 return;
165 if (enable)
166 glEnable(cap);
167 else
168 glDisable(cap);
170 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_AUTOGEN_H_