Chromium Code Reviews| 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 4255ffaa180a6253fd70b8143dd1860f83e1c619..1f28a9da995cb1542b879f38708b6b22fdb0ec02 100644 |
| --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc |
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc |
| @@ -1675,19 +1675,20 @@ TEST_P(GLES2DecoderWithShaderTest, UnClearedAttachmentsGetClearedOnClear) { |
| kFBOServiceTextureId, |
| 0, |
| GL_NO_ERROR); |
| + DoEnableDisable(GL_SCISSOR_TEST, false); |
| + DoScissor(0, 0, 1, 1); |
| // Setup "render from" texture. |
| SetupTexture(); |
| SetupExpectationsForFramebufferClearing(GL_FRAMEBUFFER, // target |
| GL_COLOR_BUFFER_BIT, // clear bits |
| - 0, |
| - 0, |
| - 0, |
| - 0, // color |
| - 0, // stencil |
| - 1.0f, // depth |
| - false); // scissor test |
| + 0, 0, 0, |
| + 0, // color |
| + 0, // stencil |
| + 1.0f, // depth |
| + false, // scissor test |
| + 0, 0, 1, 1); |
| SetupExpectationsForApplyingDirtyState(false, // Framebuffer is RGB |
| false, // Framebuffer has depth |
| false, // Framebuffer has stencil |
| @@ -1729,19 +1730,20 @@ TEST_P(GLES2DecoderWithShaderTest, UnClearedAttachmentsGetClearedOnReadPixels) { |
| kFBOServiceTextureId, |
| 0, |
| GL_NO_ERROR); |
| + DoEnableDisable(GL_SCISSOR_TEST, false); |
| + DoScissor(0, 0, 1, 1); |
| // Setup "render from" texture. |
| SetupTexture(); |
| SetupExpectationsForFramebufferClearing(GL_FRAMEBUFFER, // target |
| GL_COLOR_BUFFER_BIT, // clear bits |
| - 0, |
| - 0, |
| - 0, |
| - 0, // color |
| - 0, // stencil |
| - 1.0f, // depth |
| - false); // scissor test |
| + 0, 0, 0, |
| + 0, // color |
| + 0, // stencil |
| + 1.0f, // depth |
| + false, // scissor test |
| + 0, 0, 1, 1); |
| EXPECT_CALL(*gl_, GetError()) |
| .WillOnce(Return(GL_NO_ERROR)) |
| @@ -1800,22 +1802,22 @@ TEST_P(GLES2DecoderManualInitTest, |
| 0, |
| GL_NO_ERROR); |
| - // Enable GL_SCISSOR_TEST to make sure we disable it in the clear, |
| - // then re-enable after. |
| - DoEnableDisable(GL_SCISSOR_TEST, true); |
| + // Set scissor rect and disable GL_SCISSOR_TEST to make sure we enable it in |
| + // the clear, then disable it and restore the rect again. |
|
Ken Russell (switch to Gerrit)
2015/06/09 02:46:19
It looks to me like we've lost a test where we go
reveman
2015/06/09 03:07:37
Made the UnClearedAttachmentsGetClearedOnClear tes
|
| + DoScissor(0, 0, 32, 32); |
| + DoEnableDisable(GL_SCISSOR_TEST, false); |
| SetupExpectationsForFramebufferClearingMulti( |
| kServiceFramebufferId, // read framebuffer service id |
| 0, // backbuffer service id |
| GL_READ_FRAMEBUFFER, // target |
| GL_COLOR_BUFFER_BIT, // clear bits |
| - 0, |
| - 0, |
| - 0, |
| + 0, 0, 0, |
| 0, // color |
| 0, // stencil |
| 1.0f, // depth |
| - true); // scissor test |
| + false, // scissor test |
| + 0, 0, 32, 32); |
| EXPECT_CALL(*gl_, GetError()) |
| .WillOnce(Return(GL_NO_ERROR)) |
| @@ -2201,19 +2203,20 @@ TEST_P(GLES2DecoderManualInitTest, |
| kFBOServiceTextureId, |
| 0, |
| GL_NO_ERROR); |
| + DoEnableDisable(GL_SCISSOR_TEST, false); |
| + DoScissor(0, 0, 1, 1); |
| // Setup "render from" texture. |
| SetupTexture(); |
| SetupExpectationsForFramebufferClearing(GL_FRAMEBUFFER, // target |
| GL_COLOR_BUFFER_BIT, // clear bits |
| - 0, |
| - 0, |
| - 0, |
| - 0, // color |
| - 0, // stencil |
| - 1.0f, // depth |
| - false); // scissor test |
| + 0, 0, 0, |
| + 0, // color |
| + 0, // stencil |
| + 1.0f, // depth |
| + false, // scissor test |
| + 0, 0, 1, 1); |
| SetupExpectationsForApplyingDirtyState(false, // Framebuffer is RGB |
| false, // Framebuffer has depth |
| false, // Framebuffer has stencil |