Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Side by Side Diff: gpu/command_buffer/service/context_state_impl_autogen.h

Issue 1474513003: Upgrade PixelStorei to ES3/WebGL2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: client side Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 projection_matrix[11] = 0.0f; 101 projection_matrix[11] = 0.0f;
102 projection_matrix[12] = 0.0f; 102 projection_matrix[12] = 0.0f;
103 projection_matrix[13] = 0.0f; 103 projection_matrix[13] = 0.0f;
104 projection_matrix[14] = 0.0f; 104 projection_matrix[14] = 0.0f;
105 projection_matrix[15] = 1.0f; 105 projection_matrix[15] = 1.0f;
106 stencil_path_func = GL_ALWAYS; 106 stencil_path_func = GL_ALWAYS;
107 stencil_path_ref = 0; 107 stencil_path_ref = 0;
108 stencil_path_mask = 0xFFFFFFFFU; 108 stencil_path_mask = 0xFFFFFFFFU;
109 pack_alignment = 4; 109 pack_alignment = 4;
110 unpack_alignment = 4; 110 unpack_alignment = 4;
111 pack_row_length = 0;
112 pack_skip_pixels = 0;
113 pack_skip_rows = 0;
114 unpack_row_length = 0;
115 unpack_image_height = 0;
116 unpack_skip_pixels = 0;
117 unpack_skip_rows = 0;
118 unpack_skip_images = 0;
111 polygon_offset_factor = 0.0f; 119 polygon_offset_factor = 0.0f;
112 polygon_offset_units = 0.0f; 120 polygon_offset_units = 0.0f;
113 sample_coverage_value = 1.0f; 121 sample_coverage_value = 1.0f;
114 sample_coverage_invert = false; 122 sample_coverage_invert = false;
115 scissor_x = 0; 123 scissor_x = 0;
116 scissor_y = 0; 124 scissor_y = 0;
117 scissor_width = 1; 125 scissor_width = 1;
118 scissor_height = 1; 126 scissor_height = 1;
119 stencil_front_func = GL_ALWAYS; 127 stencil_front_func = GL_ALWAYS;
120 stencil_front_ref = 0; 128 stencil_front_ref = 0;
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 (stencil_path_ref != prev_state->stencil_path_ref) || 291 (stencil_path_ref != prev_state->stencil_path_ref) ||
284 (stencil_path_mask != prev_state->stencil_path_mask)) 292 (stencil_path_mask != prev_state->stencil_path_mask))
285 glPathStencilFuncNV(stencil_path_func, stencil_path_ref, 293 glPathStencilFuncNV(stencil_path_func, stencil_path_ref,
286 stencil_path_mask); 294 stencil_path_mask);
287 if (prev_state->pack_alignment != pack_alignment) { 295 if (prev_state->pack_alignment != pack_alignment) {
288 glPixelStorei(GL_PACK_ALIGNMENT, pack_alignment); 296 glPixelStorei(GL_PACK_ALIGNMENT, pack_alignment);
289 } 297 }
290 if (prev_state->unpack_alignment != unpack_alignment) { 298 if (prev_state->unpack_alignment != unpack_alignment) {
291 glPixelStorei(GL_UNPACK_ALIGNMENT, unpack_alignment); 299 glPixelStorei(GL_UNPACK_ALIGNMENT, unpack_alignment);
292 } 300 }
301 if (feature_info_->IsES3Capable()) {
302 if (prev_state->pack_row_length != pack_row_length) {
303 glPixelStorei(GL_PACK_ROW_LENGTH, pack_row_length);
304 }
305 }
306 if (feature_info_->IsES3Capable()) {
307 if (prev_state->pack_skip_pixels != pack_skip_pixels) {
308 glPixelStorei(GL_PACK_SKIP_PIXELS, pack_skip_pixels);
309 }
310 }
311 if (feature_info_->IsES3Capable()) {
312 if (prev_state->pack_skip_rows != pack_skip_rows) {
313 glPixelStorei(GL_PACK_SKIP_ROWS, pack_skip_rows);
314 }
315 }
316 if (feature_info_->IsES3Capable()) {
317 if (prev_state->unpack_row_length != unpack_row_length) {
318 glPixelStorei(GL_UNPACK_ROW_LENGTH, unpack_row_length);
319 }
320 }
321 if (feature_info_->IsES3Capable()) {
322 if (prev_state->unpack_image_height != unpack_image_height) {
323 glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, unpack_image_height);
324 }
325 }
326 if (feature_info_->IsES3Capable()) {
327 if (prev_state->unpack_skip_pixels != unpack_skip_pixels) {
328 glPixelStorei(GL_UNPACK_SKIP_PIXELS, unpack_skip_pixels);
329 }
330 }
331 if (feature_info_->IsES3Capable()) {
332 if (prev_state->unpack_skip_rows != unpack_skip_rows) {
333 glPixelStorei(GL_UNPACK_SKIP_ROWS, unpack_skip_rows);
334 }
335 }
336 if (feature_info_->IsES3Capable()) {
337 if (prev_state->unpack_skip_images != unpack_skip_images) {
338 glPixelStorei(GL_UNPACK_SKIP_IMAGES, unpack_skip_images);
339 }
340 }
293 if ((polygon_offset_factor != prev_state->polygon_offset_factor) || 341 if ((polygon_offset_factor != prev_state->polygon_offset_factor) ||
294 (polygon_offset_units != prev_state->polygon_offset_units)) 342 (polygon_offset_units != prev_state->polygon_offset_units))
295 glPolygonOffset(polygon_offset_factor, polygon_offset_units); 343 glPolygonOffset(polygon_offset_factor, polygon_offset_units);
296 if ((sample_coverage_value != prev_state->sample_coverage_value) || 344 if ((sample_coverage_value != prev_state->sample_coverage_value) ||
297 (sample_coverage_invert != prev_state->sample_coverage_invert)) 345 (sample_coverage_invert != prev_state->sample_coverage_invert))
298 glSampleCoverage(sample_coverage_value, sample_coverage_invert); 346 glSampleCoverage(sample_coverage_value, sample_coverage_invert);
299 if ((scissor_x != prev_state->scissor_x) || 347 if ((scissor_x != prev_state->scissor_x) ||
300 (scissor_y != prev_state->scissor_y) || 348 (scissor_y != prev_state->scissor_y) ||
301 (scissor_width != prev_state->scissor_width) || 349 (scissor_width != prev_state->scissor_width) ||
302 (scissor_height != prev_state->scissor_height)) 350 (scissor_height != prev_state->scissor_height))
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 glMatrixLoadfEXT(GL_PATH_MODELVIEW_CHROMIUM, modelview_matrix); 409 glMatrixLoadfEXT(GL_PATH_MODELVIEW_CHROMIUM, modelview_matrix);
362 } 410 }
363 if (feature_info_->feature_flags().chromium_path_rendering) { 411 if (feature_info_->feature_flags().chromium_path_rendering) {
364 glMatrixLoadfEXT(GL_PATH_PROJECTION_CHROMIUM, projection_matrix); 412 glMatrixLoadfEXT(GL_PATH_PROJECTION_CHROMIUM, projection_matrix);
365 } 413 }
366 if (feature_info_->feature_flags().chromium_path_rendering) 414 if (feature_info_->feature_flags().chromium_path_rendering)
367 glPathStencilFuncNV(stencil_path_func, stencil_path_ref, 415 glPathStencilFuncNV(stencil_path_func, stencil_path_ref,
368 stencil_path_mask); 416 stencil_path_mask);
369 glPixelStorei(GL_PACK_ALIGNMENT, pack_alignment); 417 glPixelStorei(GL_PACK_ALIGNMENT, pack_alignment);
370 glPixelStorei(GL_UNPACK_ALIGNMENT, unpack_alignment); 418 glPixelStorei(GL_UNPACK_ALIGNMENT, unpack_alignment);
419 if (feature_info_->IsES3Capable()) {
420 glPixelStorei(GL_PACK_ROW_LENGTH, pack_row_length);
421 }
422 if (feature_info_->IsES3Capable()) {
423 glPixelStorei(GL_PACK_SKIP_PIXELS, pack_skip_pixels);
424 }
425 if (feature_info_->IsES3Capable()) {
426 glPixelStorei(GL_PACK_SKIP_ROWS, pack_skip_rows);
427 }
428 if (feature_info_->IsES3Capable()) {
429 glPixelStorei(GL_UNPACK_ROW_LENGTH, unpack_row_length);
430 }
431 if (feature_info_->IsES3Capable()) {
432 glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, unpack_image_height);
433 }
434 if (feature_info_->IsES3Capable()) {
435 glPixelStorei(GL_UNPACK_SKIP_PIXELS, unpack_skip_pixels);
436 }
437 if (feature_info_->IsES3Capable()) {
438 glPixelStorei(GL_UNPACK_SKIP_ROWS, unpack_skip_rows);
439 }
440 if (feature_info_->IsES3Capable()) {
441 glPixelStorei(GL_UNPACK_SKIP_IMAGES, unpack_skip_images);
442 }
371 glPolygonOffset(polygon_offset_factor, polygon_offset_units); 443 glPolygonOffset(polygon_offset_factor, polygon_offset_units);
372 glSampleCoverage(sample_coverage_value, sample_coverage_invert); 444 glSampleCoverage(sample_coverage_value, sample_coverage_invert);
373 glScissor(scissor_x, scissor_y, scissor_width, scissor_height); 445 glScissor(scissor_x, scissor_y, scissor_width, scissor_height);
374 glStencilFuncSeparate(GL_FRONT, stencil_front_func, stencil_front_ref, 446 glStencilFuncSeparate(GL_FRONT, stencil_front_func, stencil_front_ref,
375 stencil_front_mask); 447 stencil_front_mask);
376 glStencilFuncSeparate(GL_BACK, stencil_back_func, stencil_back_ref, 448 glStencilFuncSeparate(GL_BACK, stencil_back_func, stencil_back_ref,
377 stencil_back_mask); 449 stencil_back_mask);
378 glStencilMaskSeparate(GL_FRONT, cached_stencil_front_writemask); 450 glStencilMaskSeparate(GL_FRONT, cached_stencil_front_writemask);
379 glStencilMaskSeparate(GL_BACK, cached_stencil_back_writemask); 451 glStencilMaskSeparate(GL_BACK, cached_stencil_back_writemask);
380 glStencilOpSeparate(GL_FRONT, stencil_front_fail_op, 452 glStencilOpSeparate(GL_FRONT, stencil_front_fail_op,
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 if (params) { 653 if (params) {
582 params[0] = static_cast<GLint>(pack_alignment); 654 params[0] = static_cast<GLint>(pack_alignment);
583 } 655 }
584 return true; 656 return true;
585 case GL_UNPACK_ALIGNMENT: 657 case GL_UNPACK_ALIGNMENT:
586 *num_written = 1; 658 *num_written = 1;
587 if (params) { 659 if (params) {
588 params[0] = static_cast<GLint>(unpack_alignment); 660 params[0] = static_cast<GLint>(unpack_alignment);
589 } 661 }
590 return true; 662 return true;
663 case GL_PACK_ROW_LENGTH:
664 *num_written = 1;
665 if (params) {
666 params[0] = static_cast<GLint>(pack_row_length);
667 }
668 return true;
669 case GL_PACK_SKIP_PIXELS:
670 *num_written = 1;
671 if (params) {
672 params[0] = static_cast<GLint>(pack_skip_pixels);
673 }
674 return true;
675 case GL_PACK_SKIP_ROWS:
676 *num_written = 1;
677 if (params) {
678 params[0] = static_cast<GLint>(pack_skip_rows);
679 }
680 return true;
681 case GL_UNPACK_ROW_LENGTH:
682 *num_written = 1;
683 if (params) {
684 params[0] = static_cast<GLint>(unpack_row_length);
685 }
686 return true;
687 case GL_UNPACK_IMAGE_HEIGHT:
688 *num_written = 1;
689 if (params) {
690 params[0] = static_cast<GLint>(unpack_image_height);
691 }
692 return true;
693 case GL_UNPACK_SKIP_PIXELS:
694 *num_written = 1;
695 if (params) {
696 params[0] = static_cast<GLint>(unpack_skip_pixels);
697 }
698 return true;
699 case GL_UNPACK_SKIP_ROWS:
700 *num_written = 1;
701 if (params) {
702 params[0] = static_cast<GLint>(unpack_skip_rows);
703 }
704 return true;
705 case GL_UNPACK_SKIP_IMAGES:
706 *num_written = 1;
707 if (params) {
708 params[0] = static_cast<GLint>(unpack_skip_images);
709 }
710 return true;
591 case GL_POLYGON_OFFSET_FACTOR: 711 case GL_POLYGON_OFFSET_FACTOR:
592 *num_written = 1; 712 *num_written = 1;
593 if (params) { 713 if (params) {
594 params[0] = static_cast<GLint>(round(polygon_offset_factor)); 714 params[0] = static_cast<GLint>(round(polygon_offset_factor));
595 } 715 }
596 return true; 716 return true;
597 case GL_POLYGON_OFFSET_UNITS: 717 case GL_POLYGON_OFFSET_UNITS:
598 *num_written = 1; 718 *num_written = 1;
599 if (params) { 719 if (params) {
600 params[0] = static_cast<GLint>(round(polygon_offset_units)); 720 params[0] = static_cast<GLint>(round(polygon_offset_units));
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
949 if (params) { 1069 if (params) {
950 params[0] = static_cast<GLfloat>(pack_alignment); 1070 params[0] = static_cast<GLfloat>(pack_alignment);
951 } 1071 }
952 return true; 1072 return true;
953 case GL_UNPACK_ALIGNMENT: 1073 case GL_UNPACK_ALIGNMENT:
954 *num_written = 1; 1074 *num_written = 1;
955 if (params) { 1075 if (params) {
956 params[0] = static_cast<GLfloat>(unpack_alignment); 1076 params[0] = static_cast<GLfloat>(unpack_alignment);
957 } 1077 }
958 return true; 1078 return true;
1079 case GL_PACK_ROW_LENGTH:
1080 *num_written = 1;
1081 if (params) {
1082 params[0] = static_cast<GLfloat>(pack_row_length);
1083 }
1084 return true;
1085 case GL_PACK_SKIP_PIXELS:
1086 *num_written = 1;
1087 if (params) {
1088 params[0] = static_cast<GLfloat>(pack_skip_pixels);
1089 }
1090 return true;
1091 case GL_PACK_SKIP_ROWS:
1092 *num_written = 1;
1093 if (params) {
1094 params[0] = static_cast<GLfloat>(pack_skip_rows);
1095 }
1096 return true;
1097 case GL_UNPACK_ROW_LENGTH:
1098 *num_written = 1;
1099 if (params) {
1100 params[0] = static_cast<GLfloat>(unpack_row_length);
1101 }
1102 return true;
1103 case GL_UNPACK_IMAGE_HEIGHT:
1104 *num_written = 1;
1105 if (params) {
1106 params[0] = static_cast<GLfloat>(unpack_image_height);
1107 }
1108 return true;
1109 case GL_UNPACK_SKIP_PIXELS:
1110 *num_written = 1;
1111 if (params) {
1112 params[0] = static_cast<GLfloat>(unpack_skip_pixels);
1113 }
1114 return true;
1115 case GL_UNPACK_SKIP_ROWS:
1116 *num_written = 1;
1117 if (params) {
1118 params[0] = static_cast<GLfloat>(unpack_skip_rows);
1119 }
1120 return true;
1121 case GL_UNPACK_SKIP_IMAGES:
1122 *num_written = 1;
1123 if (params) {
1124 params[0] = static_cast<GLfloat>(unpack_skip_images);
1125 }
1126 return true;
959 case GL_POLYGON_OFFSET_FACTOR: 1127 case GL_POLYGON_OFFSET_FACTOR:
960 *num_written = 1; 1128 *num_written = 1;
961 if (params) { 1129 if (params) {
962 params[0] = static_cast<GLfloat>(polygon_offset_factor); 1130 params[0] = static_cast<GLfloat>(polygon_offset_factor);
963 } 1131 }
964 return true; 1132 return true;
965 case GL_POLYGON_OFFSET_UNITS: 1133 case GL_POLYGON_OFFSET_UNITS:
966 *num_written = 1; 1134 *num_written = 1;
967 if (params) { 1135 if (params) {
968 params[0] = static_cast<GLfloat>(polygon_offset_units); 1136 params[0] = static_cast<GLfloat>(polygon_offset_units);
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
1147 if (params) { 1315 if (params) {
1148 params[0] = 1316 params[0] =
1149 static_cast<GLfloat>(enable_flags.primitive_restart_fixed_index); 1317 static_cast<GLfloat>(enable_flags.primitive_restart_fixed_index);
1150 } 1318 }
1151 return true; 1319 return true;
1152 default: 1320 default:
1153 return false; 1321 return false;
1154 } 1322 }
1155 } 1323 }
1156 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_IMPL_AUTOGEN_H_ 1324 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_IMPL_AUTOGEN_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/context_state_autogen.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698