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! |
Mark Mentovai
2015/04/09 15:42:15
Did you generate this file or just change it in-li
Mateusz Szymański
2015/04/14 10:30:15
I've edited it in-line but generating it yields th
| |
10 | 10 |
11 // It is included by gles2_cmd_decoder.cc | 11 // It is included by gles2_cmd_decoder.cc |
12 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ | 12 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ |
13 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ | 13 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ |
14 | 14 |
15 error::Error GLES2DecoderImpl::HandleActiveTexture(uint32_t immediate_data_size, | 15 error::Error GLES2DecoderImpl::HandleActiveTexture(uint32_t immediate_data_size, |
16 const void* cmd_data) { | 16 const void* cmd_data) { |
17 const gles2::cmds::ActiveTexture& c = | 17 const gles2::cmds::ActiveTexture& c = |
18 *static_cast<const gles2::cmds::ActiveTexture*>(cmd_data); | 18 *static_cast<const gles2::cmds::ActiveTexture*>(cmd_data); |
19 (void)c; | 19 (void)c; |
(...skipping 2188 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 |