OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_unittest_base.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 1366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1377 GLenum error) { | 1377 GLenum error) { |
1378 EXPECT_CALL(*gl_, GetError()) | 1378 EXPECT_CALL(*gl_, GetError()) |
1379 .WillOnce(Return(GL_NO_ERROR)) | 1379 .WillOnce(Return(GL_NO_ERROR)) |
1380 .RetiresOnSaturation(); | 1380 .RetiresOnSaturation(); |
1381 if (attachment == GL_DEPTH_STENCIL_ATTACHMENT) { | 1381 if (attachment == GL_DEPTH_STENCIL_ATTACHMENT) { |
1382 EXPECT_CALL(*gl_, FramebufferRenderbufferEXT( | 1382 EXPECT_CALL(*gl_, FramebufferRenderbufferEXT( |
1383 target, GL_DEPTH_ATTACHMENT, renderbuffer_target, | 1383 target, GL_DEPTH_ATTACHMENT, renderbuffer_target, |
1384 renderbuffer_service_id)) | 1384 renderbuffer_service_id)) |
1385 .Times(1) | 1385 .Times(1) |
1386 .RetiresOnSaturation(); | 1386 .RetiresOnSaturation(); |
| 1387 EXPECT_CALL(*gl_, GetError()) |
| 1388 .WillOnce(Return(error)) |
| 1389 .RetiresOnSaturation(); |
1387 EXPECT_CALL(*gl_, FramebufferRenderbufferEXT( | 1390 EXPECT_CALL(*gl_, FramebufferRenderbufferEXT( |
1388 target, GL_STENCIL_ATTACHMENT, renderbuffer_target, | 1391 target, GL_STENCIL_ATTACHMENT, renderbuffer_target, |
1389 renderbuffer_service_id)) | 1392 renderbuffer_service_id)) |
1390 .Times(1) | 1393 .Times(1) |
1391 .RetiresOnSaturation(); | 1394 .RetiresOnSaturation(); |
| 1395 EXPECT_CALL(*gl_, GetError()) |
| 1396 .WillOnce(Return(error)) |
| 1397 .RetiresOnSaturation(); |
1392 } else { | 1398 } else { |
1393 EXPECT_CALL(*gl_, FramebufferRenderbufferEXT( | 1399 EXPECT_CALL(*gl_, FramebufferRenderbufferEXT( |
1394 target, attachment, renderbuffer_target, renderbuffer_service_id)) | 1400 target, attachment, renderbuffer_target, renderbuffer_service_id)) |
1395 .Times(1) | 1401 .Times(1) |
1396 .RetiresOnSaturation(); | 1402 .RetiresOnSaturation(); |
| 1403 EXPECT_CALL(*gl_, GetError()) |
| 1404 .WillOnce(Return(error)) |
| 1405 .RetiresOnSaturation(); |
1397 } | 1406 } |
1398 EXPECT_CALL(*gl_, GetError()) | |
1399 .WillOnce(Return(error)) | |
1400 .RetiresOnSaturation(); | |
1401 cmds::FramebufferRenderbuffer cmd; | 1407 cmds::FramebufferRenderbuffer cmd; |
1402 cmd.Init(target, attachment, renderbuffer_target, renderbuffer_client_id); | 1408 cmd.Init(target, attachment, renderbuffer_target, renderbuffer_client_id); |
1403 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | 1409 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
1404 } | 1410 } |
1405 | 1411 |
1406 GLenum GLES2DecoderTestBase::DoCheckFramebufferStatus(GLenum target) { | 1412 GLenum GLES2DecoderTestBase::DoCheckFramebufferStatus(GLenum target) { |
1407 auto* result = static_cast<cmds::CheckFramebufferStatus::Result*>( | 1413 auto* result = static_cast<cmds::CheckFramebufferStatus::Result*>( |
1408 shared_memory_address_); | 1414 shared_memory_address_); |
1409 *result = 0; | 1415 *result = 0; |
1410 cmds::CheckFramebufferStatus cmd; | 1416 cmds::CheckFramebufferStatus cmd; |
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2123 SetupDefaultProgram(); | 2129 SetupDefaultProgram(); |
2124 } | 2130 } |
2125 | 2131 |
2126 // Include the auto-generated part of this file. We split this because it means | 2132 // Include the auto-generated part of this file. We split this because it means |
2127 // we can easily edit the non-auto generated parts right here in this file | 2133 // we can easily edit the non-auto generated parts right here in this file |
2128 // instead of having to edit some template or the code generator. | 2134 // instead of having to edit some template or the code generator. |
2129 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" | 2135 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" |
2130 | 2136 |
2131 } // namespace gles2 | 2137 } // namespace gles2 |
2132 } // namespace gpu | 2138 } // namespace gpu |
OLD | NEW |