Chromium Code Reviews| 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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 294 } | 294 } |
| 295 } | 295 } |
| 296 if (feature_info_->feature_flags().oes_standard_derivatives) { | 296 if (feature_info_->feature_flags().oes_standard_derivatives) { |
| 297 if (prev_state->hint_fragment_shader_derivative != | 297 if (prev_state->hint_fragment_shader_derivative != |
| 298 hint_fragment_shader_derivative) { | 298 hint_fragment_shader_derivative) { |
| 299 glHint(GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES, | 299 glHint(GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES, |
| 300 hint_fragment_shader_derivative); | 300 hint_fragment_shader_derivative); |
| 301 } | 301 } |
| 302 } | 302 } |
| 303 if ((line_width != prev_state->line_width)) | 303 if ((line_width != prev_state->line_width)) |
| 304 glLineWidth(line_width); | 304 DoLineWidth(line_width); |
|
piman
2016/11/07 22:34:40
The approach is reasonable, but this file is autog
Lof
2016/11/08 20:11:58
Done.
| |
| 305 if (feature_info_->feature_flags().chromium_path_rendering) { | 305 if (feature_info_->feature_flags().chromium_path_rendering) { |
| 306 if (memcmp(prev_state->modelview_matrix, modelview_matrix, | 306 if (memcmp(prev_state->modelview_matrix, modelview_matrix, |
| 307 sizeof(GLfloat) * 16)) { | 307 sizeof(GLfloat) * 16)) { |
| 308 glMatrixLoadfEXT(GL_PATH_MODELVIEW_CHROMIUM, modelview_matrix); | 308 glMatrixLoadfEXT(GL_PATH_MODELVIEW_CHROMIUM, modelview_matrix); |
| 309 } | 309 } |
| 310 } | 310 } |
| 311 if (feature_info_->feature_flags().chromium_path_rendering) { | 311 if (feature_info_->feature_flags().chromium_path_rendering) { |
| 312 if (memcmp(prev_state->projection_matrix, projection_matrix, | 312 if (memcmp(prev_state->projection_matrix, projection_matrix, |
| 313 sizeof(GLfloat) * 16)) { | 313 sizeof(GLfloat) * 16)) { |
| 314 glMatrixLoadfEXT(GL_PATH_PROJECTION_CHROMIUM, projection_matrix); | 314 glMatrixLoadfEXT(GL_PATH_PROJECTION_CHROMIUM, projection_matrix); |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 387 glDepthMask(cached_depth_mask); | 387 glDepthMask(cached_depth_mask); |
| 388 glDepthRange(z_near, z_far); | 388 glDepthRange(z_near, z_far); |
| 389 glFrontFace(front_face); | 389 glFrontFace(front_face); |
| 390 if (!feature_info_->gl_version_info().is_desktop_core_profile) { | 390 if (!feature_info_->gl_version_info().is_desktop_core_profile) { |
| 391 glHint(GL_GENERATE_MIPMAP_HINT, hint_generate_mipmap); | 391 glHint(GL_GENERATE_MIPMAP_HINT, hint_generate_mipmap); |
| 392 } | 392 } |
| 393 if (feature_info_->feature_flags().oes_standard_derivatives) { | 393 if (feature_info_->feature_flags().oes_standard_derivatives) { |
| 394 glHint(GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES, | 394 glHint(GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES, |
| 395 hint_fragment_shader_derivative); | 395 hint_fragment_shader_derivative); |
| 396 } | 396 } |
| 397 glLineWidth(line_width); | 397 DoLineWidth(line_width); |
| 398 if (feature_info_->feature_flags().chromium_path_rendering) { | 398 if (feature_info_->feature_flags().chromium_path_rendering) { |
| 399 glMatrixLoadfEXT(GL_PATH_MODELVIEW_CHROMIUM, modelview_matrix); | 399 glMatrixLoadfEXT(GL_PATH_MODELVIEW_CHROMIUM, modelview_matrix); |
| 400 } | 400 } |
| 401 if (feature_info_->feature_flags().chromium_path_rendering) { | 401 if (feature_info_->feature_flags().chromium_path_rendering) { |
| 402 glMatrixLoadfEXT(GL_PATH_PROJECTION_CHROMIUM, projection_matrix); | 402 glMatrixLoadfEXT(GL_PATH_PROJECTION_CHROMIUM, projection_matrix); |
| 403 } | 403 } |
| 404 if (feature_info_->feature_flags().chromium_path_rendering) | 404 if (feature_info_->feature_flags().chromium_path_rendering) |
| 405 glPathStencilFuncNV(stencil_path_func, stencil_path_ref, | 405 glPathStencilFuncNV(stencil_path_func, stencil_path_ref, |
| 406 stencil_path_mask); | 406 stencil_path_mask); |
| 407 glPixelStorei(GL_PACK_ALIGNMENT, pack_alignment); | 407 glPixelStorei(GL_PACK_ALIGNMENT, pack_alignment); |
| (...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1322 *num_written = 1; | 1322 *num_written = 1; |
| 1323 if (params) { | 1323 if (params) { |
| 1324 params[0] = static_cast<GLfloat>(enable_flags.sample_alpha_to_one_ext); | 1324 params[0] = static_cast<GLfloat>(enable_flags.sample_alpha_to_one_ext); |
| 1325 } | 1325 } |
| 1326 return true; | 1326 return true; |
| 1327 default: | 1327 default: |
| 1328 return false; | 1328 return false; |
| 1329 } | 1329 } |
| 1330 } | 1330 } |
| 1331 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_IMPL_AUTOGEN_H_ | 1331 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_IMPL_AUTOGEN_H_ |
| OLD | NEW |