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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
9 #include "gpu/command_buffer/common/gles2_cmd_format.h" | 9 #include "gpu/command_buffer/common/gles2_cmd_format.h" |
10 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 10 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
(...skipping 2238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2249 target, | 2249 target, |
2250 kServiceTextureId, | 2250 kServiceTextureId, |
2251 level)) | 2251 level)) |
2252 .Times(1) | 2252 .Times(1) |
2253 .RetiresOnSaturation(); | 2253 .RetiresOnSaturation(); |
2254 EXPECT_CALL(*gl_, CheckFramebufferStatusEXT(GL_DRAW_FRAMEBUFFER_EXT)) | 2254 EXPECT_CALL(*gl_, CheckFramebufferStatusEXT(GL_DRAW_FRAMEBUFFER_EXT)) |
2255 .WillOnce(Return(GL_FRAMEBUFFER_COMPLETE)) | 2255 .WillOnce(Return(GL_FRAMEBUFFER_COMPLETE)) |
2256 .RetiresOnSaturation(); | 2256 .RetiresOnSaturation(); |
2257 | 2257 |
2258 EXPECT_CALL(*gl_, ClearStencil(0)).Times(1).RetiresOnSaturation(); | 2258 EXPECT_CALL(*gl_, ClearStencil(0)).Times(1).RetiresOnSaturation(); |
2259 EXPECT_CALL(*gl_, StencilMask(-1)).Times(1).RetiresOnSaturation(); | 2259 SetupExpectationsForStencilMask(-1, -1); |
2260 EXPECT_CALL(*gl_, ClearDepth(1.0f)).Times(1).RetiresOnSaturation(); | 2260 EXPECT_CALL(*gl_, ClearDepth(1.0f)).Times(1).RetiresOnSaturation(); |
2261 SetupExpectationsForDepthMask(true); | 2261 SetupExpectationsForDepthMask(true); |
2262 SetupExpectationsForEnableDisable(GL_SCISSOR_TEST, false); | 2262 SetupExpectationsForEnableDisable(GL_SCISSOR_TEST, false); |
2263 | 2263 |
2264 EXPECT_CALL(*gl_, Clear(GL_DEPTH_BUFFER_BIT)).Times(1).RetiresOnSaturation(); | 2264 EXPECT_CALL(*gl_, Clear(GL_DEPTH_BUFFER_BIT)).Times(1).RetiresOnSaturation(); |
2265 | 2265 |
2266 SetupExpectationsForRestoreClearState(0.0f, 0.0f, 0.0f, 0.0f, 0, 1.0f, true); | 2266 SetupExpectationsForRestoreClearState(0.0f, 0.0f, 0.0f, 0.0f, 0, 1.0f, true); |
2267 | 2267 |
2268 EXPECT_CALL(*gl_, DeleteFramebuffersEXT(1, _)).Times(1).RetiresOnSaturation(); | 2268 EXPECT_CALL(*gl_, DeleteFramebuffersEXT(1, _)).Times(1).RetiresOnSaturation(); |
2269 EXPECT_CALL(*gl_, BindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, 0)) | 2269 EXPECT_CALL(*gl_, BindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, 0)) |
2270 .Times(1) | 2270 .Times(1) |
2271 .RetiresOnSaturation(); | 2271 .RetiresOnSaturation(); |
2272 | 2272 |
2273 SetupExpectationsForApplyingDefaultDirtyState(); | 2273 SetupExpectationsForApplyingDefaultDirtyState(); |
2274 EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices)) | 2274 EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices)) |
2275 .Times(1) | 2275 .Times(1) |
2276 .RetiresOnSaturation(); | 2276 .RetiresOnSaturation(); |
2277 DrawArrays cmd; | 2277 DrawArrays cmd; |
2278 cmd.Init(GL_TRIANGLES, 0, kNumVertices); | 2278 cmd.Init(GL_TRIANGLES, 0, kNumVertices); |
2279 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | 2279 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
2280 EXPECT_EQ(GL_NO_ERROR, GetGLError()); | 2280 EXPECT_EQ(GL_NO_ERROR, GetGLError()); |
2281 } | 2281 } |
2282 | 2282 |
2283 } // namespace gles2 | 2283 } // namespace gles2 |
2284 } // namespace gpu | 2284 } // namespace gpu |
OLD | NEW |