| 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 #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 Loading... |
| 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 |
| OLD | NEW |