| 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.cc | 11 // It is included by context_state.cc |
| 12 #ifndef GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_IMPL_AUTOGEN_H_ | 12 #ifndef GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_IMPL_AUTOGEN_H_ |
| 13 #define GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_IMPL_AUTOGEN_H_ | 13 #define GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_IMPL_AUTOGEN_H_ |
| 14 | 14 |
| 15 ContextState::EnableFlags::EnableFlags() | 15 ContextState::EnableFlags::EnableFlags() |
| 16 : blend(false), | 16 : blend(false), |
| 17 cached_blend(false), | 17 cached_blend(false), |
| 18 cull_face(false), | 18 cull_face(false), |
| 19 cached_cull_face(false), | 19 cached_cull_face(false), |
| 20 depth_test(false), | 20 depth_test(false), |
| 21 cached_depth_test(false), | 21 cached_depth_test(false), |
| 22 dither(true), | 22 dither(true), |
| 23 cached_dither(true), | 23 cached_dither(true), |
| 24 framebuffer_srgb_ext(true), |
| 25 cached_framebuffer_srgb_ext(true), |
| 24 polygon_offset_fill(false), | 26 polygon_offset_fill(false), |
| 25 cached_polygon_offset_fill(false), | 27 cached_polygon_offset_fill(false), |
| 26 sample_alpha_to_coverage(false), | 28 sample_alpha_to_coverage(false), |
| 27 cached_sample_alpha_to_coverage(false), | 29 cached_sample_alpha_to_coverage(false), |
| 28 sample_coverage(false), | 30 sample_coverage(false), |
| 29 cached_sample_coverage(false), | 31 cached_sample_coverage(false), |
| 30 scissor_test(false), | 32 scissor_test(false), |
| 31 cached_scissor_test(false), | 33 cached_scissor_test(false), |
| 32 stencil_test(false), | 34 stencil_test(false), |
| 33 cached_stencil_test(false), | 35 cached_stencil_test(false), |
| (...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 bool ContextState::GetEnabled(GLenum cap) const { | 428 bool ContextState::GetEnabled(GLenum cap) const { |
| 427 switch (cap) { | 429 switch (cap) { |
| 428 case GL_BLEND: | 430 case GL_BLEND: |
| 429 return enable_flags.blend; | 431 return enable_flags.blend; |
| 430 case GL_CULL_FACE: | 432 case GL_CULL_FACE: |
| 431 return enable_flags.cull_face; | 433 return enable_flags.cull_face; |
| 432 case GL_DEPTH_TEST: | 434 case GL_DEPTH_TEST: |
| 433 return enable_flags.depth_test; | 435 return enable_flags.depth_test; |
| 434 case GL_DITHER: | 436 case GL_DITHER: |
| 435 return enable_flags.dither; | 437 return enable_flags.dither; |
| 438 case GL_FRAMEBUFFER_SRGB_EXT: |
| 439 return enable_flags.framebuffer_srgb_ext; |
| 436 case GL_POLYGON_OFFSET_FILL: | 440 case GL_POLYGON_OFFSET_FILL: |
| 437 return enable_flags.polygon_offset_fill; | 441 return enable_flags.polygon_offset_fill; |
| 438 case GL_SAMPLE_ALPHA_TO_COVERAGE: | 442 case GL_SAMPLE_ALPHA_TO_COVERAGE: |
| 439 return enable_flags.sample_alpha_to_coverage; | 443 return enable_flags.sample_alpha_to_coverage; |
| 440 case GL_SAMPLE_COVERAGE: | 444 case GL_SAMPLE_COVERAGE: |
| 441 return enable_flags.sample_coverage; | 445 return enable_flags.sample_coverage; |
| 442 case GL_SCISSOR_TEST: | 446 case GL_SCISSOR_TEST: |
| 443 return enable_flags.scissor_test; | 447 return enable_flags.scissor_test; |
| 444 case GL_STENCIL_TEST: | 448 case GL_STENCIL_TEST: |
| 445 return enable_flags.stencil_test; | 449 return enable_flags.stencil_test; |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 828 if (params) { | 832 if (params) { |
| 829 params[0] = static_cast<GLint>(enable_flags.depth_test); | 833 params[0] = static_cast<GLint>(enable_flags.depth_test); |
| 830 } | 834 } |
| 831 return true; | 835 return true; |
| 832 case GL_DITHER: | 836 case GL_DITHER: |
| 833 *num_written = 1; | 837 *num_written = 1; |
| 834 if (params) { | 838 if (params) { |
| 835 params[0] = static_cast<GLint>(enable_flags.dither); | 839 params[0] = static_cast<GLint>(enable_flags.dither); |
| 836 } | 840 } |
| 837 return true; | 841 return true; |
| 842 case GL_FRAMEBUFFER_SRGB_EXT: |
| 843 *num_written = 1; |
| 844 if (params) { |
| 845 params[0] = static_cast<GLint>(enable_flags.framebuffer_srgb_ext); |
| 846 } |
| 847 return true; |
| 838 case GL_POLYGON_OFFSET_FILL: | 848 case GL_POLYGON_OFFSET_FILL: |
| 839 *num_written = 1; | 849 *num_written = 1; |
| 840 if (params) { | 850 if (params) { |
| 841 params[0] = static_cast<GLint>(enable_flags.polygon_offset_fill); | 851 params[0] = static_cast<GLint>(enable_flags.polygon_offset_fill); |
| 842 } | 852 } |
| 843 return true; | 853 return true; |
| 844 case GL_SAMPLE_ALPHA_TO_COVERAGE: | 854 case GL_SAMPLE_ALPHA_TO_COVERAGE: |
| 845 *num_written = 1; | 855 *num_written = 1; |
| 846 if (params) { | 856 if (params) { |
| 847 params[0] = static_cast<GLint>(enable_flags.sample_alpha_to_coverage); | 857 params[0] = static_cast<GLint>(enable_flags.sample_alpha_to_coverage); |
| (...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1262 if (params) { | 1272 if (params) { |
| 1263 params[0] = static_cast<GLfloat>(enable_flags.depth_test); | 1273 params[0] = static_cast<GLfloat>(enable_flags.depth_test); |
| 1264 } | 1274 } |
| 1265 return true; | 1275 return true; |
| 1266 case GL_DITHER: | 1276 case GL_DITHER: |
| 1267 *num_written = 1; | 1277 *num_written = 1; |
| 1268 if (params) { | 1278 if (params) { |
| 1269 params[0] = static_cast<GLfloat>(enable_flags.dither); | 1279 params[0] = static_cast<GLfloat>(enable_flags.dither); |
| 1270 } | 1280 } |
| 1271 return true; | 1281 return true; |
| 1282 case GL_FRAMEBUFFER_SRGB_EXT: |
| 1283 *num_written = 1; |
| 1284 if (params) { |
| 1285 params[0] = static_cast<GLfloat>(enable_flags.framebuffer_srgb_ext); |
| 1286 } |
| 1287 return true; |
| 1272 case GL_POLYGON_OFFSET_FILL: | 1288 case GL_POLYGON_OFFSET_FILL: |
| 1273 *num_written = 1; | 1289 *num_written = 1; |
| 1274 if (params) { | 1290 if (params) { |
| 1275 params[0] = static_cast<GLfloat>(enable_flags.polygon_offset_fill); | 1291 params[0] = static_cast<GLfloat>(enable_flags.polygon_offset_fill); |
| 1276 } | 1292 } |
| 1277 return true; | 1293 return true; |
| 1278 case GL_SAMPLE_ALPHA_TO_COVERAGE: | 1294 case GL_SAMPLE_ALPHA_TO_COVERAGE: |
| 1279 *num_written = 1; | 1295 *num_written = 1; |
| 1280 if (params) { | 1296 if (params) { |
| 1281 params[0] = static_cast<GLfloat>(enable_flags.sample_alpha_to_coverage); | 1297 params[0] = static_cast<GLfloat>(enable_flags.sample_alpha_to_coverage); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1322 *num_written = 1; | 1338 *num_written = 1; |
| 1323 if (params) { | 1339 if (params) { |
| 1324 params[0] = static_cast<GLfloat>(enable_flags.sample_alpha_to_one_ext); | 1340 params[0] = static_cast<GLfloat>(enable_flags.sample_alpha_to_one_ext); |
| 1325 } | 1341 } |
| 1326 return true; | 1342 return true; |
| 1327 default: | 1343 default: |
| 1328 return false; | 1344 return false; |
| 1329 } | 1345 } |
| 1330 } | 1346 } |
| 1331 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_IMPL_AUTOGEN_H_ | 1347 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_IMPL_AUTOGEN_H_ |
| OLD | NEW |