summaryrefslogtreecommitdiff
path: root/chromium/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-06-05 17:27:05 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-06-18 08:33:46 +0000
commit9f4560b1027ae06fdb497023cdcaf91b8511fa74 (patch)
treef9789c1b2941956c5cc104cf03c6b6cc93759152 /chromium/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc
parentd17ea114e5ef69ad5d5d7413280a13e6428098aa (diff)
downloadqtwebengine-chromium-9f4560b1027ae06fdb497023cdcaf91b8511fa74.tar.gz
BASELINE: Update Chromium to 67.0.3396.76
Change-Id: I9a14af4efb092ab203e9364f0779fca781909a38 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'chromium/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc')
-rw-r--r--chromium/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc43
1 files changed, 13 insertions, 30 deletions
diff --git a/chromium/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc b/chromium/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc
index 9aa5db650a6..64beb12d588 100644
--- a/chromium/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc
+++ b/chromium/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc
@@ -699,13 +699,7 @@ TEST_P(GLES2DecoderManualInitTest, CopyTexImage2DUnsizedInternalFormat) {
DoBindFramebuffer(GL_FRAMEBUFFER, 0, 0);
GLenum internal_format = kUnsizedInternalFormats[i];
DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId);
- EXPECT_CALL(*gl_, CopyTexImage2D(target, level, internal_format, 0, 0,
- width, height, border))
- .Times(1)
- .RetiresOnSaturation();
- CopyTexImage2D cmd;
- cmd.Init(target, level, internal_format, 0, 0, width, height);
- EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
+ DoCopyTexImage2D(target, level, internal_format, 0, 0, width, height, border);
EXPECT_EQ(GL_NO_ERROR, GetGLError());
TextureRef* ref = manager->GetTexture(client_texture_id_);
@@ -732,16 +726,13 @@ TEST_P(GLES2DecoderManualInitTest, CopyTexImage2DUnsizedInternalFormat) {
bool complete =
(DoCheckFramebufferStatus(GL_FRAMEBUFFER) == GL_FRAMEBUFFER_COMPLETE);
if (complete) {
- EXPECT_CALL(*gl_, CopyTexImage2D(target, level, internal_format, 0, 0,
- width, height, border))
- .Times(1)
- .RetiresOnSaturation();
- }
- cmd.Init(target, level, internal_format, 0, 0, width, height);
- EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
- if (complete) {
+ DoCopyTexImage2D(target, level, internal_format,
+ 0, 0, width, height, border);
EXPECT_EQ(GL_NO_ERROR, GetGLError());
} else {
+ CopyTexImage2D cmd;
+ cmd.Init(target, level, internal_format, 0, 0, width, height);
+ EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_INVALID_FRAMEBUFFER_OPERATION, GetGLError());
}
}
@@ -789,13 +780,8 @@ TEST_P(GLES2DecoderManualInitTest, CopyTexImage2DUnsizedInternalFormatES3) {
DoBindFramebuffer(GL_FRAMEBUFFER, 0, 0);
GLenum internal_format = kUnsizedInternalFormats[i].unsized;
DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId);
- EXPECT_CALL(*gl_, CopyTexImage2D(target, level, internal_format, 0, 0,
- width, height, border))
- .Times(1)
- .RetiresOnSaturation();
- CopyTexImage2D cmd;
- cmd.Init(target, level, internal_format, 0, 0, width, height);
- EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
+ DoCopyTexImage2D(target, level, internal_format,
+ 0, 0, width, height, border);
EXPECT_EQ(GL_NO_ERROR, GetGLError());
TextureRef* ref = manager->GetTexture(client_texture_id_);
@@ -827,16 +813,13 @@ TEST_P(GLES2DecoderManualInitTest, CopyTexImage2DUnsizedInternalFormatES3) {
bool complete =
(DoCheckFramebufferStatus(GL_FRAMEBUFFER) == GL_FRAMEBUFFER_COMPLETE);
if (complete) {
- EXPECT_CALL(*gl_, CopyTexImage2D(target, level, internal_format, 0, 0,
- width, height, border))
- .Times(1)
- .RetiresOnSaturation();
- }
- cmd.Init(target, level, internal_format, 0, 0, width, height);
- EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
- if (complete) {
+ DoCopyTexImage2D(target, level, internal_format,
+ 0, 0, width, height, border);
EXPECT_EQ(GL_NO_ERROR, GetGLError());
} else {
+ CopyTexImage2D cmd;
+ cmd.Init(target, level, internal_format, 0, 0, width, height);
+ EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
EXPECT_EQ(GL_INVALID_FRAMEBUFFER_OPERATION, GetGLError());
}
}