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 4915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4926 GLenum matrixMode = static_cast<GLenum>(c.matrixMode); | 4926 GLenum matrixMode = static_cast<GLenum>(c.matrixMode); |
4927 if (!validators_->matrix_mode.IsValid(matrixMode)) { | 4927 if (!validators_->matrix_mode.IsValid(matrixMode)) { |
4928 LOCAL_SET_GL_ERROR_INVALID_ENUM("glMatrixLoadIdentityCHROMIUM", matrixMode, | 4928 LOCAL_SET_GL_ERROR_INVALID_ENUM("glMatrixLoadIdentityCHROMIUM", matrixMode, |
4929 "matrixMode"); | 4929 "matrixMode"); |
4930 return error::kNoError; | 4930 return error::kNoError; |
4931 } | 4931 } |
4932 DoMatrixLoadIdentityCHROMIUM(matrixMode); | 4932 DoMatrixLoadIdentityCHROMIUM(matrixMode); |
4933 return error::kNoError; | 4933 return error::kNoError; |
4934 } | 4934 } |
4935 | 4935 |
| 4936 error::Error GLES2DecoderImpl::HandleIsPathCHROMIUM( |
| 4937 uint32_t immediate_data_size, |
| 4938 const void* cmd_data) { |
| 4939 const gles2::cmds::IsPathCHROMIUM& c = |
| 4940 *static_cast<const gles2::cmds::IsPathCHROMIUM*>(cmd_data); |
| 4941 (void)c; |
| 4942 if (!features().chromium_path_rendering) { |
| 4943 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, "glIsPathCHROMIUM", |
| 4944 "function not available"); |
| 4945 return error::kNoError; |
| 4946 } |
| 4947 |
| 4948 GLuint path = c.path; |
| 4949 typedef cmds::IsPathCHROMIUM::Result Result; |
| 4950 Result* result_dst = GetSharedMemoryAs<Result*>( |
| 4951 c.result_shm_id, c.result_shm_offset, sizeof(*result_dst)); |
| 4952 if (!result_dst) { |
| 4953 return error::kOutOfBounds; |
| 4954 } |
| 4955 *result_dst = DoIsPathCHROMIUM(path); |
| 4956 return error::kNoError; |
| 4957 } |
| 4958 |
| 4959 error::Error GLES2DecoderImpl::HandlePathStencilFuncCHROMIUM( |
| 4960 uint32_t immediate_data_size, |
| 4961 const void* cmd_data) { |
| 4962 const gles2::cmds::PathStencilFuncCHROMIUM& c = |
| 4963 *static_cast<const gles2::cmds::PathStencilFuncCHROMIUM*>(cmd_data); |
| 4964 (void)c; |
| 4965 if (!features().chromium_path_rendering) { |
| 4966 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, "glPathStencilFuncCHROMIUM", |
| 4967 "function not available"); |
| 4968 return error::kNoError; |
| 4969 } |
| 4970 |
| 4971 GLenum func = static_cast<GLenum>(c.func); |
| 4972 GLint ref = static_cast<GLint>(c.ref); |
| 4973 GLuint mask = static_cast<GLuint>(c.mask); |
| 4974 if (!validators_->cmp_function.IsValid(func)) { |
| 4975 LOCAL_SET_GL_ERROR_INVALID_ENUM("glPathStencilFuncCHROMIUM", func, "func"); |
| 4976 return error::kNoError; |
| 4977 } |
| 4978 if (state_.stencil_path_func != func || state_.stencil_path_ref != ref || |
| 4979 state_.stencil_path_mask != mask) { |
| 4980 state_.stencil_path_func = func; |
| 4981 state_.stencil_path_ref = ref; |
| 4982 state_.stencil_path_mask = mask; |
| 4983 glPathStencilFuncNV(func, ref, mask); |
| 4984 } |
| 4985 return error::kNoError; |
| 4986 } |
| 4987 |
4936 error::Error GLES2DecoderImpl::HandleBlendBarrierKHR( | 4988 error::Error GLES2DecoderImpl::HandleBlendBarrierKHR( |
4937 uint32_t immediate_data_size, | 4989 uint32_t immediate_data_size, |
4938 const void* cmd_data) { | 4990 const void* cmd_data) { |
4939 const gles2::cmds::BlendBarrierKHR& c = | 4991 const gles2::cmds::BlendBarrierKHR& c = |
4940 *static_cast<const gles2::cmds::BlendBarrierKHR*>(cmd_data); | 4992 *static_cast<const gles2::cmds::BlendBarrierKHR*>(cmd_data); |
4941 (void)c; | 4993 (void)c; |
4942 if (!features().blend_equation_advanced) { | 4994 if (!features().blend_equation_advanced) { |
4943 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, "glBlendBarrierKHR", | 4995 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, "glBlendBarrierKHR", |
4944 "function not available"); | 4996 "function not available"); |
4945 return error::kNoError; | 4997 return error::kNoError; |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5036 state_.enable_flags.cached_primitive_restart_fixed_index = enabled; | 5088 state_.enable_flags.cached_primitive_restart_fixed_index = enabled; |
5037 return true; | 5089 return true; |
5038 } | 5090 } |
5039 return false; | 5091 return false; |
5040 default: | 5092 default: |
5041 NOTREACHED(); | 5093 NOTREACHED(); |
5042 return false; | 5094 return false; |
5043 } | 5095 } |
5044 } | 5096 } |
5045 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ | 5097 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ |
OLD | NEW |