| 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 2197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2208 transformfeedback, &service_transformfeedback); | 2208 transformfeedback, &service_transformfeedback); |
| 2209 return error::kNoError; | 2209 return error::kNoError; |
| 2210 } | 2210 } |
| 2211 | 2211 |
| 2212 error::Error GLES2DecoderImpl::HandleLineWidth(uint32_t immediate_data_size, | 2212 error::Error GLES2DecoderImpl::HandleLineWidth(uint32_t immediate_data_size, |
| 2213 const void* cmd_data) { | 2213 const void* cmd_data) { |
| 2214 const gles2::cmds::LineWidth& c = | 2214 const gles2::cmds::LineWidth& c = |
| 2215 *static_cast<const gles2::cmds::LineWidth*>(cmd_data); | 2215 *static_cast<const gles2::cmds::LineWidth*>(cmd_data); |
| 2216 (void)c; | 2216 (void)c; |
| 2217 GLfloat width = static_cast<GLfloat>(c.width); | 2217 GLfloat width = static_cast<GLfloat>(c.width); |
| 2218 if (width <= 0.0f || base::IsNaN(width)) { | 2218 if (width <= 0.0f || std::isnan(width)) { |
| 2219 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "LineWidth", "width out of range"); | 2219 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "LineWidth", "width out of range"); |
| 2220 return error::kNoError; | 2220 return error::kNoError; |
| 2221 } | 2221 } |
| 2222 if (state_.line_width != width) { | 2222 if (state_.line_width != width) { |
| 2223 state_.line_width = width; | 2223 state_.line_width = width; |
| 2224 glLineWidth(width); | 2224 glLineWidth(width); |
| 2225 } | 2225 } |
| 2226 return error::kNoError; | 2226 return error::kNoError; |
| 2227 } | 2227 } |
| 2228 | 2228 |
| (...skipping 2649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4878 state_.enable_flags.cached_rasterizer_discard = enabled; | 4878 state_.enable_flags.cached_rasterizer_discard = enabled; |
| 4879 return true; | 4879 return true; |
| 4880 } | 4880 } |
| 4881 return false; | 4881 return false; |
| 4882 default: | 4882 default: |
| 4883 NOTREACHED(); | 4883 NOTREACHED(); |
| 4884 return false; | 4884 return false; |
| 4885 } | 4885 } |
| 4886 } | 4886 } |
| 4887 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ | 4887 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ |
| OLD | NEW |