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

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

Issue 469673003: Consistently generate INVALID_VALUE on NaN line width (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Created 6 years, 4 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 1342 matching lines...) Expand 10 before | Expand all | Expand 10 after
1353 return error::kOutOfBounds; 1353 return error::kOutOfBounds;
1354 } 1354 }
1355 *result_dst = DoIsTexture(texture); 1355 *result_dst = DoIsTexture(texture);
1356 return error::kNoError; 1356 return error::kNoError;
1357 } 1357 }
1358 1358
1359 error::Error GLES2DecoderImpl::HandleLineWidth( 1359 error::Error GLES2DecoderImpl::HandleLineWidth(
1360 uint32_t immediate_data_size, 1360 uint32_t immediate_data_size,
1361 const gles2::cmds::LineWidth& c) { 1361 const gles2::cmds::LineWidth& c) {
1362 GLfloat width = static_cast<GLfloat>(c.width); 1362 GLfloat width = static_cast<GLfloat>(c.width);
1363 if (width <= 0.0f) { 1363 if (width <= 0.0f || base::IsNaN(width)) {
1364 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "LineWidth", "width out of range"); 1364 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "LineWidth", "width out of range");
1365 return error::kNoError; 1365 return error::kNoError;
1366 } 1366 }
1367 if (state_.line_width != width) { 1367 if (state_.line_width != width) {
1368 state_.line_width = width; 1368 state_.line_width = width;
1369 glLineWidth(width); 1369 glLineWidth(width);
1370 } 1370 }
1371 return error::kNoError; 1371 return error::kNoError;
1372 } 1372 }
1373 1373
(...skipping 1552 matching lines...) Expand 10 before | Expand all | Expand 10 after
2926 state_.ignore_cached_state) { 2926 state_.ignore_cached_state) {
2927 framebuffer_state_.clear_state_dirty = true; 2927 framebuffer_state_.clear_state_dirty = true;
2928 } 2928 }
2929 return false; 2929 return false;
2930 default: 2930 default:
2931 NOTREACHED(); 2931 NOTREACHED();
2932 return false; 2932 return false;
2933 } 2933 }
2934 } 2934 }
2935 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_ 2935 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698