Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3329)

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc

Issue 10441087: Plum through ANGLE_depth_texture (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 2886ed12f5a8599b5b4a24be8d19f315712e447e..8ff9770c9ec3d81b43577335503d06ea5c019101 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
@@ -388,6 +388,31 @@ void GLES2DecoderTestBase::SetupExpectationsForFramebufferClearing(
restore_scissor_test);
}
+void GLES2DecoderTestBase::SetupExpectationsForRestoreClearState(
+ GLclampf restore_red,
+ GLclampf restore_green,
+ GLclampf restore_blue,
+ GLclampf restore_alpha,
+ GLuint restore_stencil,
+ GLclampf restore_depth,
+ bool restore_scissor_test) {
+ EXPECT_CALL(*gl_, ClearColor(
+ restore_red, restore_green, restore_blue, restore_alpha))
+ .Times(1)
+ .RetiresOnSaturation();
+ EXPECT_CALL(*gl_, ClearStencil(restore_stencil))
+ .Times(1)
+ .RetiresOnSaturation();
+ EXPECT_CALL(*gl_, ClearDepth(restore_depth))
+ .Times(1)
+ .RetiresOnSaturation();
+ if (restore_scissor_test) {
+ EXPECT_CALL(*gl_, Enable(GL_SCISSOR_TEST))
+ .Times(1)
+ .RetiresOnSaturation();
+ }
+}
+
void GLES2DecoderTestBase::SetupExpectationsForFramebufferClearingMulti(
GLuint read_framebuffer_service_id,
GLuint draw_framebuffer_service_id,
@@ -444,21 +469,9 @@ void GLES2DecoderTestBase::SetupExpectationsForFramebufferClearingMulti(
EXPECT_CALL(*gl_, Clear(clear_bits))
.Times(1)
.RetiresOnSaturation();
- EXPECT_CALL(*gl_, ClearColor(
- restore_red, restore_green, restore_blue, restore_alpha))
- .Times(1)
- .RetiresOnSaturation();
- EXPECT_CALL(*gl_, ClearStencil(restore_stencil))
- .Times(1)
- .RetiresOnSaturation();
- EXPECT_CALL(*gl_, ClearDepth(restore_depth))
- .Times(1)
- .RetiresOnSaturation();
- if (restore_scissor_test) {
- EXPECT_CALL(*gl_, Enable(GL_SCISSOR_TEST))
- .Times(1)
- .RetiresOnSaturation();
- }
+ SetupExpectationsForRestoreClearState(
+ restore_red, restore_green, restore_blue, restore_alpha,
+ restore_stencil, restore_depth, restore_scissor_test);
if (target == GL_READ_FRAMEBUFFER_EXT) {
EXPECT_CALL(*gl_, BindFramebufferEXT(
GL_READ_FRAMEBUFFER_EXT, read_framebuffer_service_id))

Powered by Google App Engine
This is Rietveld 408576698