| 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 670782ecb6243bb97252cfe4918b8eb3cc585274..348495b62b85a5984d28e644b033cc90da4134f7 100644
|
| --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| @@ -5918,7 +5918,13 @@ bool GLES2DecoderImpl::GetHelper(
|
| ScopedGLErrorSuppressor suppressor("GLES2DecoderImpl::GetHelper",
|
| GetErrorState());
|
| glGetIntegerv(pname, params);
|
| - if (glGetError() != GL_NO_ERROR) {
|
| + bool is_valid = glGetError() == GL_NO_ERROR;
|
| + if (is_valid) {
|
| + is_valid = pname == GL_IMPLEMENTATION_COLOR_READ_FORMAT ?
|
| + validators_->read_pixel_format.IsValid(*params) :
|
| + validators_->read_pixel_type.IsValid(*params);
|
| + }
|
| + if (!is_valid) {
|
| if (pname == GL_IMPLEMENTATION_COLOR_READ_FORMAT) {
|
| *params = GLES2Util::GetGLReadPixelsImplementationFormat(
|
| GetBoundReadFrameBufferInternalFormat(),
|
|
|