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

Unified Diff: gpu/command_buffer/service/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
Index: gpu/command_buffer/service/context_state.cc
diff --git a/gpu/command_buffer/service/context_state.cc b/gpu/command_buffer/service/context_state.cc
index a430d1d8bcb0de3000f0cb09eb79c99a6e4b4412..85cde3bfab3297f1782f67c74860de1c61d7c6cf 100644
--- a/gpu/command_buffer/service/context_state.cc
+++ b/gpu/command_buffer/service/context_state.cc
@@ -461,15 +461,9 @@ void ContextState::UpdateUnpackParameters() const {
if (bound_pixel_unpack_buffer.get()) {
glPixelStorei(GL_UNPACK_ROW_LENGTH, unpack_row_length);
glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, unpack_image_height);
- glPixelStorei(GL_UNPACK_SKIP_PIXELS, unpack_skip_pixels);
- glPixelStorei(GL_UNPACK_SKIP_ROWS, unpack_skip_rows);
- glPixelStorei(GL_UNPACK_SKIP_IMAGES, unpack_skip_images);
} else {
glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, 0);
- glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
- glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
- glPixelStorei(GL_UNPACK_SKIP_IMAGES, 0);
}
}
@@ -599,23 +593,23 @@ void ContextState::UnbindSampler(Sampler* sampler) {
}
PixelStoreParams ContextState::GetPackParams() {
+ DCHECK_EQ(0, pack_skip_pixels);
+ DCHECK_EQ(0, pack_skip_rows);
PixelStoreParams params;
params.alignment = pack_alignment;
params.row_length = pack_row_length;
- params.skip_pixels = pack_skip_pixels;
- params.skip_rows = pack_skip_rows;
return params;
}
PixelStoreParams ContextState::GetUnpackParams(Dimension dimension) {
+ DCHECK_EQ(0, unpack_skip_pixels);
+ DCHECK_EQ(0, unpack_skip_rows);
+ DCHECK_EQ(0, unpack_skip_images);
PixelStoreParams params;
params.alignment = unpack_alignment;
params.row_length = unpack_row_length;
- params.skip_pixels = unpack_skip_pixels;
- params.skip_rows = unpack_skip_rows;
if (dimension == k3D) {
params.image_height = unpack_image_height;
- params.skip_images = unpack_skip_images;
}
return params;
}
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation_unittest.cc ('k') | gpu/command_buffer/service/feature_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698