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

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

Issue 2859723002: Copy NV12 picture buffers on demand on the main thread. (Closed)
Patch Set: fix build Created 3 years, 7 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_textures.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc
index 0b167790a8878e26f804351e11257870c9b15da5..a392c459c8f24af9650bb1209c5f155869f37373 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc
@@ -3871,8 +3871,8 @@ TEST_P(GLES2DecoderWithShaderTest, CopyTexImage) {
// Bind image to texture.
EXPECT_CALL(*image.get(), BindTexImage(GL_TEXTURE_2D))
- .Times(1)
- .WillOnce(Return(false))
+ .Times(2)
+ .WillRepeatedly(Return(false))
.RetiresOnSaturation();
EXPECT_CALL(*image.get(), GetSize())
.Times(1)
@@ -3882,6 +3882,9 @@ TEST_P(GLES2DecoderWithShaderTest, CopyTexImage) {
.Times(1)
.WillOnce(Return(GL_RGBA))
.RetiresOnSaturation();
+ EXPECT_CALL(*gl_, BindTexture(GL_TEXTURE_2D, kServiceTextureId))
+ .Times(1)
+ .RetiresOnSaturation();
// ScopedGLErrorSuppressor calls GetError on its constructor and destructor.
DoBindTexImage2DCHROMIUM(GL_TEXTURE_2D, kImageId);
@@ -3907,13 +3910,15 @@ TEST_P(GLES2DecoderWithShaderTest, CopyTexImage) {
EXPECT_EQ(GL_NO_ERROR, GetGLError());
DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId);
+
+ Mock::VerifyAndClearExpectations(gl_.get());
// Re-bind image to texture.
ReleaseTexImage2DCHROMIUM release_tex_image_2d_cmd;
release_tex_image_2d_cmd.Init(GL_TEXTURE_2D, kImageId);
EXPECT_EQ(error::kNoError, ExecuteCmd(release_tex_image_2d_cmd));
EXPECT_CALL(*image.get(), BindTexImage(GL_TEXTURE_2D))
- .Times(1)
- .WillOnce(Return(false))
+ .Times(2)
+ .WillRepeatedly(Return(false))
.RetiresOnSaturation();
EXPECT_CALL(*image.get(), GetSize())
.Times(1)

Powered by Google App Engine
This is Rietveld 408576698