Index: gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc |
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc |
index fafe2b92ff0eda3309ee0c1bdadd865608ee8384..d51733ea8a1f707a5e7174eaaeab25077abb2639 100644 |
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc |
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc |
@@ -40,7 +40,6 @@ using ::testing::Pointee; |
using ::testing::Return; |
using ::testing::SaveArg; |
using ::testing::SetArrayArgument; |
-using ::testing::SetArgumentPointee; |
using ::testing::SetArgPointee; |
using ::testing::StrEq; |
using ::testing::StrictMock; |
@@ -144,8 +143,7 @@ TEST_P(GLES2DecoderTest, GetFramebufferAttachmentParameterivWithRenderbuffer) { |
DoBindFramebuffer( |
GL_FRAMEBUFFER, client_framebuffer_id_, kServiceFramebufferId); |
EXPECT_CALL(*gl_, GetError()) |
- .WillOnce(Return(GL_NO_ERROR)) |
- .RetiresOnSaturation(); |
+ .WillRepeatedly(Return(GL_NO_ERROR)); |
EXPECT_CALL(*gl_, |
FramebufferRenderbufferEXT(GL_FRAMEBUFFER, |
GL_COLOR_ATTACHMENT0, |
@@ -153,12 +151,13 @@ TEST_P(GLES2DecoderTest, GetFramebufferAttachmentParameterivWithRenderbuffer) { |
kServiceRenderbufferId)) |
.Times(1) |
.RetiresOnSaturation(); |
- EXPECT_CALL(*gl_, GetError()) |
- .WillOnce(Return(GL_NO_ERROR)) |
- .RetiresOnSaturation(); |
- EXPECT_CALL(*gl_, GetError()) |
- .WillOnce(Return(GL_NO_ERROR)) |
- .WillOnce(Return(GL_NO_ERROR)) |
+ EXPECT_CALL(*gl_, |
+ GetFramebufferAttachmentParameterivEXT( |
+ GL_FRAMEBUFFER, |
+ GL_COLOR_ATTACHMENT0, |
+ GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME, |
+ _)) |
+ .WillOnce(SetArgPointee<3>(client_renderbuffer_id_)) |
.RetiresOnSaturation(); |
GetFramebufferAttachmentParameteriv::Result* result = |
static_cast<GetFramebufferAttachmentParameteriv::Result*>( |
@@ -179,15 +178,14 @@ TEST_P(GLES2DecoderTest, GetFramebufferAttachmentParameterivWithRenderbuffer) { |
EXPECT_EQ(error::kNoError, ExecuteCmd(fbrb_cmd)); |
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
EXPECT_EQ(GL_NO_ERROR, GetGLError()); |
- EXPECT_EQ(static_cast<GLuint>(*result_value), client_renderbuffer_id_); |
+ EXPECT_EQ(client_renderbuffer_id_, static_cast<GLuint>(*result_value)); |
} |
TEST_P(GLES2DecoderTest, GetFramebufferAttachmentParameterivWithTexture) { |
DoBindFramebuffer( |
GL_FRAMEBUFFER, client_framebuffer_id_, kServiceFramebufferId); |
EXPECT_CALL(*gl_, GetError()) |
- .WillOnce(Return(GL_NO_ERROR)) |
- .RetiresOnSaturation(); |
+ .WillRepeatedly(Return(GL_NO_ERROR)); |
EXPECT_CALL(*gl_, |
FramebufferTexture2DEXT(GL_FRAMEBUFFER, |
GL_COLOR_ATTACHMENT0, |
@@ -196,12 +194,13 @@ TEST_P(GLES2DecoderTest, GetFramebufferAttachmentParameterivWithTexture) { |
0)) |
.Times(1) |
.RetiresOnSaturation(); |
- EXPECT_CALL(*gl_, GetError()) |
- .WillOnce(Return(GL_NO_ERROR)) |
- .RetiresOnSaturation(); |
- EXPECT_CALL(*gl_, GetError()) |
- .WillOnce(Return(GL_NO_ERROR)) |
- .WillOnce(Return(GL_NO_ERROR)) |
+ EXPECT_CALL(*gl_, |
+ GetFramebufferAttachmentParameterivEXT( |
+ GL_FRAMEBUFFER, |
+ GL_COLOR_ATTACHMENT0, |
+ GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME, |
+ _)) |
+ .WillOnce(SetArgPointee<3>(client_texture_id_)) |
.RetiresOnSaturation(); |
GetFramebufferAttachmentParameteriv::Result* result = |
static_cast<GetFramebufferAttachmentParameteriv::Result*>( |
@@ -222,7 +221,7 @@ TEST_P(GLES2DecoderTest, GetFramebufferAttachmentParameterivWithTexture) { |
EXPECT_EQ(error::kNoError, ExecuteCmd(fbtex_cmd)); |
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
EXPECT_EQ(GL_NO_ERROR, GetGLError()); |
- EXPECT_EQ(static_cast<GLuint>(*result_value), client_texture_id_); |
+ EXPECT_EQ(client_texture_id_, static_cast<GLuint>(*result_value)); |
} |
TEST_P(GLES2DecoderWithShaderTest, |
@@ -986,7 +985,7 @@ TEST_P(GLES2DecoderManualInitTest, ActualDepthMatchesRequestedDepth) { |
typedef GetIntegerv::Result Result; |
Result* result = static_cast<Result*>(shared_memory_address_); |
EXPECT_CALL(*gl_, GetIntegerv(GL_DEPTH_BITS, _)) |
- .WillOnce(SetArgumentPointee<1>(24)) |
+ .WillOnce(SetArgPointee<1>(24)) |
.RetiresOnSaturation(); |
result->size = 0; |
GetIntegerv cmd2; |
@@ -1011,7 +1010,7 @@ TEST_P(GLES2DecoderManualInitTest, ActualDepthDoesNotMatchRequestedDepth) { |
typedef GetIntegerv::Result Result; |
Result* result = static_cast<Result*>(shared_memory_address_); |
EXPECT_CALL(*gl_, GetIntegerv(GL_DEPTH_BITS, _)) |
- .WillOnce(SetArgumentPointee<1>(24)) |
+ .WillOnce(SetArgPointee<1>(24)) |
.RetiresOnSaturation(); |
result->size = 0; |
GetIntegerv cmd2; |
@@ -1037,7 +1036,7 @@ TEST_P(GLES2DecoderManualInitTest, ActualStencilMatchesRequestedStencil) { |
typedef GetIntegerv::Result Result; |
Result* result = static_cast<Result*>(shared_memory_address_); |
EXPECT_CALL(*gl_, GetIntegerv(GL_STENCIL_BITS, _)) |
- .WillOnce(SetArgumentPointee<1>(8)) |
+ .WillOnce(SetArgPointee<1>(8)) |
.RetiresOnSaturation(); |
result->size = 0; |
GetIntegerv cmd2; |
@@ -1062,7 +1061,7 @@ TEST_P(GLES2DecoderManualInitTest, ActualStencilDoesNotMatchRequestedStencil) { |
typedef GetIntegerv::Result Result; |
Result* result = static_cast<Result*>(shared_memory_address_); |
EXPECT_CALL(*gl_, GetIntegerv(GL_STENCIL_BITS, _)) |
- .WillOnce(SetArgumentPointee<1>(8)) |
+ .WillOnce(SetArgPointee<1>(8)) |
.RetiresOnSaturation(); |
result->size = 0; |
GetIntegerv cmd2; |
@@ -1097,7 +1096,7 @@ TEST_P(GLES2DecoderManualInitTest, PackedDepthStencilReportsCorrectValues) { |
GetIntegerv cmd2; |
cmd2.Init(GL_STENCIL_BITS, shared_memory_id_, shared_memory_offset_); |
EXPECT_CALL(*gl_, GetIntegerv(GL_STENCIL_BITS, _)) |
- .WillOnce(SetArgumentPointee<1>(8)) |
+ .WillOnce(SetArgPointee<1>(8)) |
.RetiresOnSaturation(); |
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd2)); |
EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned(GL_STENCIL_BITS), |
@@ -1107,7 +1106,7 @@ TEST_P(GLES2DecoderManualInitTest, PackedDepthStencilReportsCorrectValues) { |
result->size = 0; |
cmd2.Init(GL_DEPTH_BITS, shared_memory_id_, shared_memory_offset_); |
EXPECT_CALL(*gl_, GetIntegerv(GL_DEPTH_BITS, _)) |
- .WillOnce(SetArgumentPointee<1>(24)) |
+ .WillOnce(SetArgPointee<1>(24)) |
.RetiresOnSaturation(); |
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd2)); |
EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned(GL_DEPTH_BITS), |
@@ -1138,7 +1137,7 @@ TEST_P(GLES2DecoderManualInitTest, PackedDepthStencilNoRequestedStencil) { |
GetIntegerv cmd2; |
cmd2.Init(GL_STENCIL_BITS, shared_memory_id_, shared_memory_offset_); |
EXPECT_CALL(*gl_, GetIntegerv(GL_STENCIL_BITS, _)) |
- .WillOnce(SetArgumentPointee<1>(8)) |
+ .WillOnce(SetArgPointee<1>(8)) |
.RetiresOnSaturation(); |
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd2)); |
EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned(GL_STENCIL_BITS), |
@@ -1148,7 +1147,7 @@ TEST_P(GLES2DecoderManualInitTest, PackedDepthStencilNoRequestedStencil) { |
result->size = 0; |
cmd2.Init(GL_DEPTH_BITS, shared_memory_id_, shared_memory_offset_); |
EXPECT_CALL(*gl_, GetIntegerv(GL_DEPTH_BITS, _)) |
- .WillOnce(SetArgumentPointee<1>(24)) |
+ .WillOnce(SetArgPointee<1>(24)) |
.RetiresOnSaturation(); |
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd2)); |
EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned(GL_DEPTH_BITS), |
@@ -1208,7 +1207,7 @@ TEST_P(GLES2DecoderManualInitTest, PackedDepthStencilRenderbufferDepth) { |
GetIntegerv cmd2; |
cmd2.Init(GL_STENCIL_BITS, shared_memory_id_, shared_memory_offset_); |
EXPECT_CALL(*gl_, GetIntegerv(GL_STENCIL_BITS, _)) |
- .WillOnce(SetArgumentPointee<1>(8)) |
+ .WillOnce(SetArgPointee<1>(8)) |
.RetiresOnSaturation(); |
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd2)); |
EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned(GL_STENCIL_BITS), |
@@ -1218,7 +1217,7 @@ TEST_P(GLES2DecoderManualInitTest, PackedDepthStencilRenderbufferDepth) { |
result->size = 0; |
cmd2.Init(GL_DEPTH_BITS, shared_memory_id_, shared_memory_offset_); |
EXPECT_CALL(*gl_, GetIntegerv(GL_DEPTH_BITS, _)) |
- .WillOnce(SetArgumentPointee<1>(24)) |
+ .WillOnce(SetArgPointee<1>(24)) |
.RetiresOnSaturation(); |
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd2)); |
EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned(GL_DEPTH_BITS), |
@@ -1278,7 +1277,7 @@ TEST_P(GLES2DecoderManualInitTest, PackedDepthStencilRenderbufferStencil) { |
GetIntegerv cmd2; |
cmd2.Init(GL_STENCIL_BITS, shared_memory_id_, shared_memory_offset_); |
EXPECT_CALL(*gl_, GetIntegerv(GL_STENCIL_BITS, _)) |
- .WillOnce(SetArgumentPointee<1>(8)) |
+ .WillOnce(SetArgPointee<1>(8)) |
.RetiresOnSaturation(); |
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd2)); |
EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned(GL_STENCIL_BITS), |
@@ -1288,7 +1287,7 @@ TEST_P(GLES2DecoderManualInitTest, PackedDepthStencilRenderbufferStencil) { |
result->size = 0; |
cmd2.Init(GL_DEPTH_BITS, shared_memory_id_, shared_memory_offset_); |
EXPECT_CALL(*gl_, GetIntegerv(GL_DEPTH_BITS, _)) |
- .WillOnce(SetArgumentPointee<1>(24)) |
+ .WillOnce(SetArgPointee<1>(24)) |
.RetiresOnSaturation(); |
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd2)); |
EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned(GL_DEPTH_BITS), |
@@ -1776,7 +1775,7 @@ TEST_P(GLES2DecoderWithShaderTest, UnClearedAttachmentsGetClearedOnClear) { |
// Register a texture id. |
EXPECT_CALL(*gl_, GenTextures(_, _)) |
- .WillOnce(SetArgumentPointee<1>(kFBOServiceTextureId)) |
+ .WillOnce(SetArgPointee<1>(kFBOServiceTextureId)) |
.RetiresOnSaturation(); |
GenHelper<GenTexturesImmediate>(kFBOClientTextureId); |
@@ -1833,7 +1832,7 @@ TEST_P(GLES2DecoderWithShaderTest, UnClearedAttachmentsGetClearedOnReadPixels) { |
// Register a texture id. |
EXPECT_CALL(*gl_, GenTextures(_, _)) |
- .WillOnce(SetArgumentPointee<1>(kFBOServiceTextureId)) |
+ .WillOnce(SetArgPointee<1>(kFBOServiceTextureId)) |
.RetiresOnSaturation(); |
GenHelper<GenTexturesImmediate>(kFBOClientTextureId); |
@@ -1904,7 +1903,7 @@ TEST_P(GLES2DecoderManualInitTest, |
// Register a texture id. |
EXPECT_CALL(*gl_, GenTextures(_, _)) |
- .WillOnce(SetArgumentPointee<1>(kFBOServiceTextureId)) |
+ .WillOnce(SetArgPointee<1>(kFBOServiceTextureId)) |
.RetiresOnSaturation(); |
GenHelper<GenTexturesImmediate>(kFBOClientTextureId); |
@@ -2063,7 +2062,7 @@ void GLES2DecoderWithShaderTest::CheckTextureChangesMarkFBOAsNotComplete( |
// Register a texture id. |
EXPECT_CALL(*gl_, GenTextures(_, _)) |
- .WillOnce(SetArgumentPointee<1>(kFBOServiceTextureId)) |
+ .WillOnce(SetArgPointee<1>(kFBOServiceTextureId)) |
.RetiresOnSaturation(); |
GenHelper<GenTexturesImmediate>(kFBOClientTextureId); |
@@ -2306,7 +2305,7 @@ TEST_P(GLES2DecoderManualInitTest, |
// Register a texture id. |
EXPECT_CALL(*gl_, GenTextures(_, _)) |
- .WillOnce(SetArgumentPointee<1>(kFBOServiceTextureId)) |
+ .WillOnce(SetArgPointee<1>(kFBOServiceTextureId)) |
.RetiresOnSaturation(); |
GenHelper<GenTexturesImmediate>(kFBOClientTextureId); |
@@ -2407,7 +2406,7 @@ TEST_P(GLES2DecoderManualInitTest, ReadFormatExtension) { |
// Register a texture id. |
EXPECT_CALL(*gl_, GenTextures(_, _)) |
- .WillOnce(SetArgumentPointee<1>(kFBOServiceTextureId)) |
+ .WillOnce(SetArgPointee<1>(kFBOServiceTextureId)) |
.RetiresOnSaturation(); |
GenHelper<GenTexturesImmediate>(kFBOClientTextureId); |
@@ -2464,7 +2463,7 @@ TEST_P(GLES2DecoderManualInitTest, NoReadFormatExtension) { |
// Register a texture id. |
EXPECT_CALL(*gl_, GenTextures(_, _)) |
- .WillOnce(SetArgumentPointee<1>(kFBOServiceTextureId)) |
+ .WillOnce(SetArgPointee<1>(kFBOServiceTextureId)) |
.RetiresOnSaturation(); |
GenHelper<GenTexturesImmediate>(kFBOClientTextureId); |