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

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc

Issue 2475793002: Fix crash when drawing without a program (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc
index b78da1e7e5caf72d39a3e5fd3bae01c74b77c115..bf03c32aad53f22e1a58a3c46d6b111e181e588f 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc
@@ -2339,5 +2339,15 @@ TEST_P(GLES2DecoderManualInitTest, DrawClearsDepthTexture) {
EXPECT_EQ(GL_NO_ERROR, GetGLError());
}
+TEST_P(GLES3DecoderTest, DrawNoProgram) {
+ SetupAllNeededVertexBuffers();
+
+ EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, _, _)).Times(0);
+ DrawArrays cmd;
+ cmd.Init(GL_TRIANGLES, 0, kNumVertices);
+ EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
+ EXPECT_EQ(GL_NO_ERROR, GetGLError());
+}
+
} // namespace gles2
} // namespace gpu
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698