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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h b/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
index 8011ab19990ac46b82968f7c531f2bb11dd9e6eb..b35899cfbc2797dc67edbabbff8241e3d1e704a0 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
@@ -1360,7 +1360,7 @@ error::Error GLES2DecoderImpl::HandleLineWidth(
uint32_t immediate_data_size,
const gles2::cmds::LineWidth& c) {
GLfloat width = static_cast<GLfloat>(c.width);
- if (width <= 0.0f) {
+ if (width <= 0.0f || base::IsNaN(width)) {
LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "LineWidth", "width out of range");
return error::kNoError;
}
« 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