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

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

Issue 169603002: Add initial support for NV_path_rendering extension to gpu command buffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 months 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 color_mask_alpha = true; 46 color_mask_alpha = true;
47 cull_mode = GL_BACK; 47 cull_mode = GL_BACK;
48 depth_func = GL_LESS; 48 depth_func = GL_LESS;
49 depth_mask = true; 49 depth_mask = true;
50 z_near = 0.0f; 50 z_near = 0.0f;
51 z_far = 1.0f; 51 z_far = 1.0f;
52 front_face = GL_CCW; 52 front_face = GL_CCW;
53 hint_generate_mipmap = GL_DONT_CARE; 53 hint_generate_mipmap = GL_DONT_CARE;
54 hint_fragment_shader_derivative = GL_DONT_CARE; 54 hint_fragment_shader_derivative = GL_DONT_CARE;
55 line_width = 1.0f; 55 line_width = 1.0f;
56 modelview_matrix[0] = 0.0f;
57 modelview_matrix[1] = 0.0f;
58 modelview_matrix[2] = 0.0f;
59 modelview_matrix[3] = 0.0f;
60 modelview_matrix[4] = 0.0f;
61 modelview_matrix[5] = 0.0f;
62 modelview_matrix[6] = 0.0f;
63 modelview_matrix[7] = 0.0f;
64 modelview_matrix[8] = 0.0f;
65 modelview_matrix[9] = 0.0f;
66 modelview_matrix[10] = 0.0f;
67 modelview_matrix[11] = 0.0f;
68 modelview_matrix[12] = 0.0f;
69 modelview_matrix[13] = 0.0f;
70 modelview_matrix[14] = 0.0f;
71 modelview_matrix[15] = 0.0f;
72 projection_matrix[0] = 0.0f;
73 projection_matrix[1] = 0.0f;
74 projection_matrix[2] = 0.0f;
75 projection_matrix[3] = 0.0f;
76 projection_matrix[4] = 0.0f;
77 projection_matrix[5] = 0.0f;
78 projection_matrix[6] = 0.0f;
79 projection_matrix[7] = 0.0f;
80 projection_matrix[8] = 0.0f;
81 projection_matrix[9] = 0.0f;
82 projection_matrix[10] = 0.0f;
83 projection_matrix[11] = 0.0f;
84 projection_matrix[12] = 0.0f;
85 projection_matrix[13] = 0.0f;
86 projection_matrix[14] = 0.0f;
87 projection_matrix[15] = 0.0f;
56 pack_alignment = 4; 88 pack_alignment = 4;
57 unpack_alignment = 4; 89 unpack_alignment = 4;
58 polygon_offset_factor = 0.0f; 90 polygon_offset_factor = 0.0f;
59 polygon_offset_units = 0.0f; 91 polygon_offset_units = 0.0f;
60 sample_coverage_value = 1.0f; 92 sample_coverage_value = 1.0f;
61 sample_coverage_invert = false; 93 sample_coverage_invert = false;
62 scissor_x = 0; 94 scissor_x = 0;
63 scissor_y = 0; 95 scissor_y = 0;
64 scissor_width = 1; 96 scissor_width = 1;
65 scissor_height = 1; 97 scissor_height = 1;
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 glFrontFace(front_face); 204 glFrontFace(front_face);
173 if (prev_state->hint_generate_mipmap != hint_generate_mipmap) 205 if (prev_state->hint_generate_mipmap != hint_generate_mipmap)
174 glHint(GL_GENERATE_MIPMAP_HINT, hint_generate_mipmap); 206 glHint(GL_GENERATE_MIPMAP_HINT, hint_generate_mipmap);
175 if (feature_info_->feature_flags().oes_standard_derivatives) 207 if (feature_info_->feature_flags().oes_standard_derivatives)
176 if (prev_state->hint_fragment_shader_derivative != 208 if (prev_state->hint_fragment_shader_derivative !=
177 hint_fragment_shader_derivative) 209 hint_fragment_shader_derivative)
178 glHint(GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES, 210 glHint(GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES,
179 hint_fragment_shader_derivative); 211 hint_fragment_shader_derivative);
180 if ((line_width != prev_state->line_width)) 212 if ((line_width != prev_state->line_width))
181 glLineWidth(line_width); 213 glLineWidth(line_width);
214 if (feature_info_->feature_flags().chromium_path_rendering)
215 if (memcmp(prev_state->modelview_matrix,
216 modelview_matrix,
217 sizeof(GLfloat) * 16))
218 glMatrixLoadfEXT(GL_MODELVIEW_CHROMIUM, modelview_matrix);
219 if (feature_info_->feature_flags().chromium_path_rendering)
220 if (memcmp(prev_state->projection_matrix,
221 projection_matrix,
222 sizeof(GLfloat) * 16))
223 glMatrixLoadfEXT(GL_PROJECTION_CHROMIUM, projection_matrix);
182 if (prev_state->pack_alignment != pack_alignment) 224 if (prev_state->pack_alignment != pack_alignment)
183 glPixelStorei(GL_PACK_ALIGNMENT, pack_alignment); 225 glPixelStorei(GL_PACK_ALIGNMENT, pack_alignment);
184 if (prev_state->unpack_alignment != unpack_alignment) 226 if (prev_state->unpack_alignment != unpack_alignment)
185 glPixelStorei(GL_UNPACK_ALIGNMENT, unpack_alignment); 227 glPixelStorei(GL_UNPACK_ALIGNMENT, unpack_alignment);
186 if ((polygon_offset_factor != prev_state->polygon_offset_factor) || 228 if ((polygon_offset_factor != prev_state->polygon_offset_factor) ||
187 (polygon_offset_units != prev_state->polygon_offset_units)) 229 (polygon_offset_units != prev_state->polygon_offset_units))
188 glPolygonOffset(polygon_offset_factor, polygon_offset_units); 230 glPolygonOffset(polygon_offset_factor, polygon_offset_units);
189 if ((sample_coverage_value != prev_state->sample_coverage_value) || 231 if ((sample_coverage_value != prev_state->sample_coverage_value) ||
190 (sample_coverage_invert != prev_state->sample_coverage_invert)) 232 (sample_coverage_invert != prev_state->sample_coverage_invert))
191 glSampleCoverage(sample_coverage_value, sample_coverage_invert); 233 glSampleCoverage(sample_coverage_value, sample_coverage_invert);
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 glCullFace(cull_mode); 288 glCullFace(cull_mode);
247 glDepthFunc(depth_func); 289 glDepthFunc(depth_func);
248 glDepthMask(depth_mask); 290 glDepthMask(depth_mask);
249 glDepthRange(z_near, z_far); 291 glDepthRange(z_near, z_far);
250 glFrontFace(front_face); 292 glFrontFace(front_face);
251 glHint(GL_GENERATE_MIPMAP_HINT, hint_generate_mipmap); 293 glHint(GL_GENERATE_MIPMAP_HINT, hint_generate_mipmap);
252 if (feature_info_->feature_flags().oes_standard_derivatives) 294 if (feature_info_->feature_flags().oes_standard_derivatives)
253 glHint(GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES, 295 glHint(GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES,
254 hint_fragment_shader_derivative); 296 hint_fragment_shader_derivative);
255 glLineWidth(line_width); 297 glLineWidth(line_width);
298 if (feature_info_->feature_flags().chromium_path_rendering)
299 glMatrixLoadfEXT(GL_MODELVIEW_CHROMIUM, modelview_matrix);
300 if (feature_info_->feature_flags().chromium_path_rendering)
301 glMatrixLoadfEXT(GL_PROJECTION_CHROMIUM, projection_matrix);
256 glPixelStorei(GL_PACK_ALIGNMENT, pack_alignment); 302 glPixelStorei(GL_PACK_ALIGNMENT, pack_alignment);
257 glPixelStorei(GL_UNPACK_ALIGNMENT, unpack_alignment); 303 glPixelStorei(GL_UNPACK_ALIGNMENT, unpack_alignment);
258 glPolygonOffset(polygon_offset_factor, polygon_offset_units); 304 glPolygonOffset(polygon_offset_factor, polygon_offset_units);
259 glSampleCoverage(sample_coverage_value, sample_coverage_invert); 305 glSampleCoverage(sample_coverage_value, sample_coverage_invert);
260 glScissor(scissor_x, scissor_y, scissor_width, scissor_height); 306 glScissor(scissor_x, scissor_y, scissor_width, scissor_height);
261 glStencilFuncSeparate( 307 glStencilFuncSeparate(
262 GL_FRONT, stencil_front_func, stencil_front_ref, stencil_front_mask); 308 GL_FRONT, stencil_front_func, stencil_front_ref, stencil_front_mask);
263 glStencilFuncSeparate( 309 glStencilFuncSeparate(
264 GL_BACK, stencil_back_func, stencil_back_ref, stencil_back_mask); 310 GL_BACK, stencil_back_func, stencil_back_ref, stencil_back_mask);
265 glStencilMaskSeparate(GL_FRONT, stencil_front_writemask); 311 glStencilMaskSeparate(GL_FRONT, stencil_front_writemask);
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 if (params) { 468 if (params) {
423 params[0] = static_cast<GLint>(hint_fragment_shader_derivative); 469 params[0] = static_cast<GLint>(hint_fragment_shader_derivative);
424 } 470 }
425 return true; 471 return true;
426 case GL_LINE_WIDTH: 472 case GL_LINE_WIDTH:
427 *num_written = 1; 473 *num_written = 1;
428 if (params) { 474 if (params) {
429 params[0] = static_cast<GLint>(line_width); 475 params[0] = static_cast<GLint>(line_width);
430 } 476 }
431 return true; 477 return true;
478 case GL_MODELVIEW_MATRIX_CHROMIUM:
479 *num_written = 16;
480 if (params) {
481 for (size_t i = 0; i < 16; ++i) {
482 params[i] = static_cast<GLint>(modelview_matrix[i]);
483 }
484 }
485 return true;
486 case GL_PROJECTION_MATRIX_CHROMIUM:
487 *num_written = 16;
488 if (params) {
489 for (size_t i = 0; i < 16; ++i) {
490 params[i] = static_cast<GLint>(projection_matrix[i]);
491 }
492 }
493 return true;
432 case GL_PACK_ALIGNMENT: 494 case GL_PACK_ALIGNMENT:
433 *num_written = 1; 495 *num_written = 1;
434 if (params) { 496 if (params) {
435 params[0] = static_cast<GLint>(pack_alignment); 497 params[0] = static_cast<GLint>(pack_alignment);
436 } 498 }
437 return true; 499 return true;
438 case GL_UNPACK_ALIGNMENT: 500 case GL_UNPACK_ALIGNMENT:
439 *num_written = 1; 501 *num_written = 1;
440 if (params) { 502 if (params) {
441 params[0] = static_cast<GLint>(unpack_alignment); 503 params[0] = static_cast<GLint>(unpack_alignment);
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 if (params) { 809 if (params) {
748 params[0] = static_cast<GLfloat>(hint_fragment_shader_derivative); 810 params[0] = static_cast<GLfloat>(hint_fragment_shader_derivative);
749 } 811 }
750 return true; 812 return true;
751 case GL_LINE_WIDTH: 813 case GL_LINE_WIDTH:
752 *num_written = 1; 814 *num_written = 1;
753 if (params) { 815 if (params) {
754 params[0] = static_cast<GLfloat>(line_width); 816 params[0] = static_cast<GLfloat>(line_width);
755 } 817 }
756 return true; 818 return true;
819 case GL_MODELVIEW_MATRIX_CHROMIUM:
820 *num_written = 16;
821 if (params) {
822 memcpy(params, modelview_matrix, sizeof(GLfloat) * 16);
823 }
824 return true;
825 case GL_PROJECTION_MATRIX_CHROMIUM:
826 *num_written = 16;
827 if (params) {
828 memcpy(params, projection_matrix, sizeof(GLfloat) * 16);
829 }
830 return true;
757 case GL_PACK_ALIGNMENT: 831 case GL_PACK_ALIGNMENT:
758 *num_written = 1; 832 *num_written = 1;
759 if (params) { 833 if (params) {
760 params[0] = static_cast<GLfloat>(pack_alignment); 834 params[0] = static_cast<GLfloat>(pack_alignment);
761 } 835 }
762 return true; 836 return true;
763 case GL_UNPACK_ALIGNMENT: 837 case GL_UNPACK_ALIGNMENT:
764 *num_written = 1; 838 *num_written = 1;
765 if (params) { 839 if (params) {
766 params[0] = static_cast<GLfloat>(unpack_alignment); 840 params[0] = static_cast<GLfloat>(unpack_alignment);
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
944 *num_written = 1; 1018 *num_written = 1;
945 if (params) { 1019 if (params) {
946 params[0] = static_cast<GLfloat>(enable_flags.stencil_test); 1020 params[0] = static_cast<GLfloat>(enable_flags.stencil_test);
947 } 1021 }
948 return true; 1022 return true;
949 default: 1023 default:
950 return false; 1024 return false;
951 } 1025 }
952 } 1026 }
953 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_IMPL_AUTOGEN_H_ 1027 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_IMPL_AUTOGEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698