Index: gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc |
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc |
index 1401d2d8f277cf29439c3f71db672018d2b919f9..ffa888cdbe2151799cb3977e9373531599ed3203 100644 |
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc |
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc |
@@ -344,15 +344,34 @@ void GLES2DecoderTestBase::InitDecoderWithCommandLine( |
EXPECT_CALL(*gl_, BindFramebufferEXT(GL_FRAMEBUFFER, 0)) |
.Times(1) |
.RetiresOnSaturation(); |
- EXPECT_CALL(*gl_, GetIntegerv(GL_ALPHA_BITS, _)) |
- .WillOnce(SetArgumentPointee<1>(normalized_init.has_alpha ? 8 : 0)) |
- .RetiresOnSaturation(); |
- EXPECT_CALL(*gl_, GetIntegerv(GL_DEPTH_BITS, _)) |
- .WillOnce(SetArgumentPointee<1>(normalized_init.has_depth ? 24 : 0)) |
- .RetiresOnSaturation(); |
- EXPECT_CALL(*gl_, GetIntegerv(GL_STENCIL_BITS, _)) |
- .WillOnce(SetArgumentPointee<1>(normalized_init.has_stencil ? 8 : 0)) |
- .RetiresOnSaturation(); |
+ |
+ if (group_->feature_info()->gl_version_info().is_desktop_core_profile) { |
+ EXPECT_CALL(*gl_, GetFramebufferAttachmentParameterivEXT( |
+ GL_FRAMEBUFFER, GL_BACK_LEFT, |
+ GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE, _)) |
+ .WillOnce(SetArgumentPointee<3>(normalized_init.has_alpha ? 8 : 0)) |
+ .RetiresOnSaturation(); |
+ EXPECT_CALL(*gl_, GetFramebufferAttachmentParameterivEXT( |
+ GL_FRAMEBUFFER, GL_DEPTH, |
+ GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE, _)) |
+ .WillOnce(SetArgumentPointee<3>(normalized_init.has_depth ? 24 : 0)) |
+ .RetiresOnSaturation(); |
+ EXPECT_CALL(*gl_, GetFramebufferAttachmentParameterivEXT( |
+ GL_FRAMEBUFFER, GL_STENCIL, |
+ GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE, _)) |
+ .WillOnce(SetArgumentPointee<3>(normalized_init.has_stencil ? 8 : 0)) |
+ .RetiresOnSaturation(); |
+ } else { |
+ EXPECT_CALL(*gl_, GetIntegerv(GL_ALPHA_BITS, _)) |
+ .WillOnce(SetArgumentPointee<1>(normalized_init.has_alpha ? 8 : 0)) |
+ .RetiresOnSaturation(); |
+ EXPECT_CALL(*gl_, GetIntegerv(GL_DEPTH_BITS, _)) |
+ .WillOnce(SetArgumentPointee<1>(normalized_init.has_depth ? 24 : 0)) |
+ .RetiresOnSaturation(); |
+ EXPECT_CALL(*gl_, GetIntegerv(GL_STENCIL_BITS, _)) |
+ .WillOnce(SetArgumentPointee<1>(normalized_init.has_stencil ? 8 : 0)) |
+ .RetiresOnSaturation(); |
+ } |
if (!group_->feature_info()->gl_version_info().BehavesLikeGLES()) { |
EXPECT_CALL(*gl_, Enable(GL_VERTEX_PROGRAM_POINT_SIZE)) |
@@ -362,6 +381,12 @@ void GLES2DecoderTestBase::InitDecoderWithCommandLine( |
EXPECT_CALL(*gl_, Enable(GL_POINT_SPRITE)) |
.Times(1) |
.RetiresOnSaturation(); |
+ } else if (group_->feature_info() |
+ ->gl_version_info() |
+ .is_desktop_core_profile) { |
+ EXPECT_CALL(*gl_, Enable(GL_PROGRAM_POINT_SIZE)) |
+ .Times(1) |
+ .RetiresOnSaturation(); |
} |
if (group_->feature_info()->gl_version_info().IsAtLeastGL(3, 2)) { |