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

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder.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/gles2_cmd_decoder.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 739ee861d2ab0c2910a3e5239df4c423e44e1bae..49dbed8c808d0adddded0809e6694c2aa0b0afee 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -9547,23 +9547,25 @@ error::Error GLES2DecoderImpl::HandlePixelStorei(uint32_t immediate_data_size,
}
break;
case GL_PACK_ROW_LENGTH:
- case GL_PACK_SKIP_PIXELS:
- case GL_PACK_SKIP_ROWS:
case GL_UNPACK_ROW_LENGTH:
case GL_UNPACK_IMAGE_HEIGHT:
- case GL_UNPACK_SKIP_PIXELS:
- case GL_UNPACK_SKIP_ROWS:
- case GL_UNPACK_SKIP_IMAGES:
if (param < 0) {
LOCAL_SET_GL_ERROR(
GL_INVALID_VALUE, "glPixelStorei", "invalid param");
return error::kNoError;
}
+ break;
+ case GL_PACK_SKIP_PIXELS:
+ case GL_PACK_SKIP_ROWS:
+ case GL_UNPACK_SKIP_PIXELS:
+ case GL_UNPACK_SKIP_ROWS:
+ case GL_UNPACK_SKIP_IMAGES:
+ // All SKIP parameters are handled on the client side and should never
+ // be passed to the service side.
+ return error::kInvalidArguments;
default:
break;
}
- // For pack skip parameters, we don't apply them and handle them in command
- // buffer.
// For alignment parameters, we always apply them.
// For other parameters, we don't apply them if no buffer is bound at
// PIXEL_PACK or PIXEL_UNPACK. We will handle pack and unpack according to
@@ -9573,14 +9575,8 @@ error::Error GLES2DecoderImpl::HandlePixelStorei(uint32_t immediate_data_size,
if (state_.bound_pixel_pack_buffer.get())
glPixelStorei(pname, param);
break;
- case GL_PACK_SKIP_PIXELS:
- case GL_PACK_SKIP_ROWS:
- break;
case GL_UNPACK_ROW_LENGTH:
case GL_UNPACK_IMAGE_HEIGHT:
- case GL_UNPACK_SKIP_PIXELS:
- case GL_UNPACK_SKIP_ROWS:
- case GL_UNPACK_SKIP_IMAGES:
if (state_.bound_pixel_unpack_buffer.get())
glPixelStorei(pname, param);
break;
@@ -9595,12 +9591,6 @@ error::Error GLES2DecoderImpl::HandlePixelStorei(uint32_t immediate_data_size,
case GL_PACK_ROW_LENGTH:
state_.pack_row_length = param;
break;
- case GL_PACK_SKIP_PIXELS:
- state_.pack_skip_pixels = param;
- break;
- case GL_PACK_SKIP_ROWS:
- state_.pack_skip_rows = param;
- break;
case GL_UNPACK_ALIGNMENT:
state_.unpack_alignment = param;
break;
@@ -9610,15 +9600,6 @@ error::Error GLES2DecoderImpl::HandlePixelStorei(uint32_t immediate_data_size,
case GL_UNPACK_IMAGE_HEIGHT:
state_.unpack_image_height = param;
break;
- case GL_UNPACK_SKIP_PIXELS:
- state_.unpack_skip_pixels = param;
- break;
- case GL_UNPACK_SKIP_ROWS:
- state_.unpack_skip_rows = param;
- break;
- case GL_UNPACK_SKIP_IMAGES:
- state_.unpack_skip_images = param;
- break;
default:
// Validation should have prevented us from getting here.
NOTREACHED();
« no previous file with comments | « gpu/command_buffer/service/feature_info_unittest.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698