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

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

Issue 1785483002: Handle UNPACK_SKIP_* and PACK_SKIP_* parameters on the client side. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc
index 5301a4999be7c40c2ea73f7f508bc828ccf96232..35a8197003c623dd8f30e70c19e45924bd304a9b 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc
@@ -55,25 +55,13 @@ namespace {
void SetupUpdateES3UnpackParametersExpectations(
::gfx::MockGLInterface* gl,
GLint row_length,
- GLint image_height,
- GLint skip_pixels,
- GLint skip_rows,
- GLint skip_images) {
+ GLint image_height) {
EXPECT_CALL(*gl, PixelStorei(GL_UNPACK_ROW_LENGTH, row_length))
.Times(1)
.RetiresOnSaturation();
EXPECT_CALL(*gl, PixelStorei(GL_UNPACK_IMAGE_HEIGHT, image_height))
.Times(1)
.RetiresOnSaturation();
- EXPECT_CALL(*gl, PixelStorei(GL_UNPACK_SKIP_ROWS, skip_rows))
- .Times(1)
- .RetiresOnSaturation();
- EXPECT_CALL(*gl, PixelStorei(GL_UNPACK_SKIP_PIXELS, skip_pixels))
- .Times(1)
- .RetiresOnSaturation();
- EXPECT_CALL(*gl, PixelStorei(GL_UNPACK_SKIP_IMAGES, skip_images))
- .Times(1)
- .RetiresOnSaturation();
}
} // namespace anonymous
@@ -431,12 +419,12 @@ TEST_P(GLES3DecoderTest, ES3PixelStoreiWithPixelUnpackBuffer) {
// is cached and not passed down to GL.
EXPECT_CALL(*gl_, PixelStorei(_, _)).Times(0);
cmds::PixelStorei cmd;
- cmd.Init(GL_UNPACK_SKIP_ROWS, 2);
+ cmd.Init(GL_UNPACK_ROW_LENGTH, 8);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
// When a PIXEL_UNPACK_BUFFER is bound, all cached unpack parameters are
// applied to GL.
- SetupUpdateES3UnpackParametersExpectations(gl_.get(), 0, 0, 0, 2, 0);
+ SetupUpdateES3UnpackParametersExpectations(gl_.get(), 8, 0);
DoBindBuffer(GL_PIXEL_UNPACK_BUFFER, client_buffer_id_, kServiceBufferId);
// Now with a bound PIXEL_UNPACK_BUFFER, all PixelStorei calls with unpack
@@ -449,16 +437,16 @@ TEST_P(GLES3DecoderTest, ES3PixelStoreiWithPixelUnpackBuffer) {
// Now unbind PIXEL_UNPACK_BUFFER, all ES3 unpack parameters are set back to
// 0.
- SetupUpdateES3UnpackParametersExpectations(gl_.get(), 0, 0, 0, 0, 0);
+ SetupUpdateES3UnpackParametersExpectations(gl_.get(), 0, 0);
DoBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0, 0);
// Again, PixelStorei calls with unpack parameters are cached.
EXPECT_CALL(*gl_, PixelStorei(_, _)).Times(0);
- cmd.Init(GL_UNPACK_SKIP_ROWS, 3);
+ cmd.Init(GL_UNPACK_ROW_LENGTH, 32);
EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
// Bind a PIXEL_UNPACK_BUFFER again.
- SetupUpdateES3UnpackParametersExpectations(gl_.get(), 16, 0, 0, 3, 0);
+ SetupUpdateES3UnpackParametersExpectations(gl_.get(), 32, 0);
DoBindBuffer(GL_PIXEL_UNPACK_BUFFER, client_buffer_id_, kServiceBufferId);
}
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698