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 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 projection_matrix[6] = 0.0f; | 79 projection_matrix[6] = 0.0f; |
80 projection_matrix[7] = 0.0f; | 80 projection_matrix[7] = 0.0f; |
81 projection_matrix[8] = 0.0f; | 81 projection_matrix[8] = 0.0f; |
82 projection_matrix[9] = 0.0f; | 82 projection_matrix[9] = 0.0f; |
83 projection_matrix[10] = 1.0f; | 83 projection_matrix[10] = 1.0f; |
84 projection_matrix[11] = 0.0f; | 84 projection_matrix[11] = 0.0f; |
85 projection_matrix[12] = 0.0f; | 85 projection_matrix[12] = 0.0f; |
86 projection_matrix[13] = 0.0f; | 86 projection_matrix[13] = 0.0f; |
87 projection_matrix[14] = 0.0f; | 87 projection_matrix[14] = 0.0f; |
88 projection_matrix[15] = 1.0f; | 88 projection_matrix[15] = 1.0f; |
| 89 stencil_path_func = GL_ALWAYS; |
| 90 stencil_path_ref = 0; |
| 91 stencil_path_mask = 0xFFFFFFFFU; |
89 pack_alignment = 4; | 92 pack_alignment = 4; |
90 unpack_alignment = 4; | 93 unpack_alignment = 4; |
91 polygon_offset_factor = 0.0f; | 94 polygon_offset_factor = 0.0f; |
92 polygon_offset_units = 0.0f; | 95 polygon_offset_units = 0.0f; |
93 sample_coverage_value = 1.0f; | 96 sample_coverage_value = 1.0f; |
94 sample_coverage_invert = false; | 97 sample_coverage_invert = false; |
95 scissor_x = 0; | 98 scissor_x = 0; |
96 scissor_y = 0; | 99 scissor_y = 0; |
97 scissor_width = 1; | 100 scissor_width = 1; |
98 scissor_height = 1; | 101 scissor_height = 1; |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 if (feature_info_->feature_flags().chromium_path_rendering) | 218 if (feature_info_->feature_flags().chromium_path_rendering) |
216 if (memcmp(prev_state->modelview_matrix, | 219 if (memcmp(prev_state->modelview_matrix, |
217 modelview_matrix, | 220 modelview_matrix, |
218 sizeof(GLfloat) * 16)) | 221 sizeof(GLfloat) * 16)) |
219 glMatrixLoadfEXT(GL_MODELVIEW_CHROMIUM, modelview_matrix); | 222 glMatrixLoadfEXT(GL_MODELVIEW_CHROMIUM, modelview_matrix); |
220 if (feature_info_->feature_flags().chromium_path_rendering) | 223 if (feature_info_->feature_flags().chromium_path_rendering) |
221 if (memcmp(prev_state->projection_matrix, | 224 if (memcmp(prev_state->projection_matrix, |
222 projection_matrix, | 225 projection_matrix, |
223 sizeof(GLfloat) * 16)) | 226 sizeof(GLfloat) * 16)) |
224 glMatrixLoadfEXT(GL_PROJECTION_CHROMIUM, projection_matrix); | 227 glMatrixLoadfEXT(GL_PROJECTION_CHROMIUM, projection_matrix); |
| 228 if (feature_info_->feature_flags().chromium_path_rendering) |
| 229 if ((stencil_path_func != prev_state->stencil_path_func) || |
| 230 (stencil_path_ref != prev_state->stencil_path_ref) || |
| 231 (stencil_path_mask != prev_state->stencil_path_mask)) |
| 232 glPathStencilFuncNV( |
| 233 stencil_path_func, stencil_path_ref, stencil_path_mask); |
225 if (prev_state->pack_alignment != pack_alignment) | 234 if (prev_state->pack_alignment != pack_alignment) |
226 glPixelStorei(GL_PACK_ALIGNMENT, pack_alignment); | 235 glPixelStorei(GL_PACK_ALIGNMENT, pack_alignment); |
227 if (prev_state->unpack_alignment != unpack_alignment) | 236 if (prev_state->unpack_alignment != unpack_alignment) |
228 glPixelStorei(GL_UNPACK_ALIGNMENT, unpack_alignment); | 237 glPixelStorei(GL_UNPACK_ALIGNMENT, unpack_alignment); |
229 if ((polygon_offset_factor != prev_state->polygon_offset_factor) || | 238 if ((polygon_offset_factor != prev_state->polygon_offset_factor) || |
230 (polygon_offset_units != prev_state->polygon_offset_units)) | 239 (polygon_offset_units != prev_state->polygon_offset_units)) |
231 glPolygonOffset(polygon_offset_factor, polygon_offset_units); | 240 glPolygonOffset(polygon_offset_factor, polygon_offset_units); |
232 if ((sample_coverage_value != prev_state->sample_coverage_value) || | 241 if ((sample_coverage_value != prev_state->sample_coverage_value) || |
233 (sample_coverage_invert != prev_state->sample_coverage_invert)) | 242 (sample_coverage_invert != prev_state->sample_coverage_invert)) |
234 glSampleCoverage(sample_coverage_value, sample_coverage_invert); | 243 glSampleCoverage(sample_coverage_value, sample_coverage_invert); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 glFrontFace(front_face); | 302 glFrontFace(front_face); |
294 glHint(GL_GENERATE_MIPMAP_HINT, hint_generate_mipmap); | 303 glHint(GL_GENERATE_MIPMAP_HINT, hint_generate_mipmap); |
295 if (feature_info_->feature_flags().oes_standard_derivatives) | 304 if (feature_info_->feature_flags().oes_standard_derivatives) |
296 glHint(GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES, | 305 glHint(GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES, |
297 hint_fragment_shader_derivative); | 306 hint_fragment_shader_derivative); |
298 glLineWidth(line_width); | 307 glLineWidth(line_width); |
299 if (feature_info_->feature_flags().chromium_path_rendering) | 308 if (feature_info_->feature_flags().chromium_path_rendering) |
300 glMatrixLoadfEXT(GL_MODELVIEW_CHROMIUM, modelview_matrix); | 309 glMatrixLoadfEXT(GL_MODELVIEW_CHROMIUM, modelview_matrix); |
301 if (feature_info_->feature_flags().chromium_path_rendering) | 310 if (feature_info_->feature_flags().chromium_path_rendering) |
302 glMatrixLoadfEXT(GL_PROJECTION_CHROMIUM, projection_matrix); | 311 glMatrixLoadfEXT(GL_PROJECTION_CHROMIUM, projection_matrix); |
| 312 if (feature_info_->feature_flags().chromium_path_rendering) |
| 313 glPathStencilFuncNV( |
| 314 stencil_path_func, stencil_path_ref, stencil_path_mask); |
303 glPixelStorei(GL_PACK_ALIGNMENT, pack_alignment); | 315 glPixelStorei(GL_PACK_ALIGNMENT, pack_alignment); |
304 glPixelStorei(GL_UNPACK_ALIGNMENT, unpack_alignment); | 316 glPixelStorei(GL_UNPACK_ALIGNMENT, unpack_alignment); |
305 glPolygonOffset(polygon_offset_factor, polygon_offset_units); | 317 glPolygonOffset(polygon_offset_factor, polygon_offset_units); |
306 glSampleCoverage(sample_coverage_value, sample_coverage_invert); | 318 glSampleCoverage(sample_coverage_value, sample_coverage_invert); |
307 glScissor(scissor_x, scissor_y, scissor_width, scissor_height); | 319 glScissor(scissor_x, scissor_y, scissor_width, scissor_height); |
308 glStencilFuncSeparate( | 320 glStencilFuncSeparate( |
309 GL_FRONT, stencil_front_func, stencil_front_ref, stencil_front_mask); | 321 GL_FRONT, stencil_front_func, stencil_front_ref, stencil_front_mask); |
310 glStencilFuncSeparate( | 322 glStencilFuncSeparate( |
311 GL_BACK, stencil_back_func, stencil_back_ref, stencil_back_mask); | 323 GL_BACK, stencil_back_func, stencil_back_ref, stencil_back_mask); |
312 glStencilMaskSeparate(GL_FRONT, stencil_front_writemask); | 324 glStencilMaskSeparate(GL_FRONT, stencil_front_writemask); |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 } | 497 } |
486 return true; | 498 return true; |
487 case GL_PROJECTION_MATRIX_CHROMIUM: | 499 case GL_PROJECTION_MATRIX_CHROMIUM: |
488 *num_written = 16; | 500 *num_written = 16; |
489 if (params) { | 501 if (params) { |
490 for (size_t i = 0; i < 16; ++i) { | 502 for (size_t i = 0; i < 16; ++i) { |
491 params[i] = static_cast<GLint>(round(projection_matrix[i])); | 503 params[i] = static_cast<GLint>(round(projection_matrix[i])); |
492 } | 504 } |
493 } | 505 } |
494 return true; | 506 return true; |
| 507 case GL_PATH_STENCIL_FUNC_CHROMIUM: |
| 508 *num_written = 1; |
| 509 if (params) { |
| 510 params[0] = static_cast<GLint>(stencil_path_func); |
| 511 } |
| 512 return true; |
| 513 case GL_PATH_STENCIL_REF_CHROMIUM: |
| 514 *num_written = 1; |
| 515 if (params) { |
| 516 params[0] = static_cast<GLint>(stencil_path_ref); |
| 517 } |
| 518 return true; |
| 519 case GL_PATH_STENCIL_VALUE_MASK_CHROMIUM: |
| 520 *num_written = 1; |
| 521 if (params) { |
| 522 params[0] = static_cast<GLint>(stencil_path_mask); |
| 523 } |
| 524 return true; |
495 case GL_PACK_ALIGNMENT: | 525 case GL_PACK_ALIGNMENT: |
496 *num_written = 1; | 526 *num_written = 1; |
497 if (params) { | 527 if (params) { |
498 params[0] = static_cast<GLint>(pack_alignment); | 528 params[0] = static_cast<GLint>(pack_alignment); |
499 } | 529 } |
500 return true; | 530 return true; |
501 case GL_UNPACK_ALIGNMENT: | 531 case GL_UNPACK_ALIGNMENT: |
502 *num_written = 1; | 532 *num_written = 1; |
503 if (params) { | 533 if (params) { |
504 params[0] = static_cast<GLint>(unpack_alignment); | 534 params[0] = static_cast<GLint>(unpack_alignment); |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
822 if (params) { | 852 if (params) { |
823 memcpy(params, modelview_matrix, sizeof(GLfloat) * 16); | 853 memcpy(params, modelview_matrix, sizeof(GLfloat) * 16); |
824 } | 854 } |
825 return true; | 855 return true; |
826 case GL_PROJECTION_MATRIX_CHROMIUM: | 856 case GL_PROJECTION_MATRIX_CHROMIUM: |
827 *num_written = 16; | 857 *num_written = 16; |
828 if (params) { | 858 if (params) { |
829 memcpy(params, projection_matrix, sizeof(GLfloat) * 16); | 859 memcpy(params, projection_matrix, sizeof(GLfloat) * 16); |
830 } | 860 } |
831 return true; | 861 return true; |
| 862 case GL_PATH_STENCIL_FUNC_CHROMIUM: |
| 863 *num_written = 1; |
| 864 if (params) { |
| 865 params[0] = static_cast<GLfloat>(stencil_path_func); |
| 866 } |
| 867 return true; |
| 868 case GL_PATH_STENCIL_REF_CHROMIUM: |
| 869 *num_written = 1; |
| 870 if (params) { |
| 871 params[0] = static_cast<GLfloat>(stencil_path_ref); |
| 872 } |
| 873 return true; |
| 874 case GL_PATH_STENCIL_VALUE_MASK_CHROMIUM: |
| 875 *num_written = 1; |
| 876 if (params) { |
| 877 params[0] = static_cast<GLfloat>(stencil_path_mask); |
| 878 } |
| 879 return true; |
832 case GL_PACK_ALIGNMENT: | 880 case GL_PACK_ALIGNMENT: |
833 *num_written = 1; | 881 *num_written = 1; |
834 if (params) { | 882 if (params) { |
835 params[0] = static_cast<GLfloat>(pack_alignment); | 883 params[0] = static_cast<GLfloat>(pack_alignment); |
836 } | 884 } |
837 return true; | 885 return true; |
838 case GL_UNPACK_ALIGNMENT: | 886 case GL_UNPACK_ALIGNMENT: |
839 *num_written = 1; | 887 *num_written = 1; |
840 if (params) { | 888 if (params) { |
841 params[0] = static_cast<GLfloat>(unpack_alignment); | 889 params[0] = static_cast<GLfloat>(unpack_alignment); |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1019 *num_written = 1; | 1067 *num_written = 1; |
1020 if (params) { | 1068 if (params) { |
1021 params[0] = static_cast<GLfloat>(enable_flags.stencil_test); | 1069 params[0] = static_cast<GLfloat>(enable_flags.stencil_test); |
1022 } | 1070 } |
1023 return true; | 1071 return true; |
1024 default: | 1072 default: |
1025 return false; | 1073 return false; |
1026 } | 1074 } |
1027 } | 1075 } |
1028 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_IMPL_AUTOGEN_H_ | 1076 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_IMPL_AUTOGEN_H_ |
OLD | NEW |