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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 2321 matching lines...) Expand 10 before | Expand all | Expand 10 after
2332 SetupExpectationsForApplyingDefaultDirtyState(); 2332 SetupExpectationsForApplyingDefaultDirtyState();
2333 EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices)) 2333 EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices))
2334 .Times(1) 2334 .Times(1)
2335 .RetiresOnSaturation(); 2335 .RetiresOnSaturation();
2336 DrawArrays cmd; 2336 DrawArrays cmd;
2337 cmd.Init(GL_TRIANGLES, 0, kNumVertices); 2337 cmd.Init(GL_TRIANGLES, 0, kNumVertices);
2338 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 2338 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
2339 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 2339 EXPECT_EQ(GL_NO_ERROR, GetGLError());
2340 } 2340 }
2341 2341
2342 TEST_P(GLES3DecoderTest, DrawNoProgram) {
2343 SetupAllNeededVertexBuffers();
2344
2345 EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, _, _)).Times(0);
2346 DrawArrays cmd;
2347 cmd.Init(GL_TRIANGLES, 0, kNumVertices);
2348 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
2349 EXPECT_EQ(GL_NO_ERROR, GetGLError());
2350 }
2351
2342 } // namespace gles2 2352 } // namespace gles2
2343 } // namespace gpu 2353 } // namespace gpu
OLDNEW
« 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