| Index: gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc
|
| diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc
|
| index eac5a98899c05e024437b08b58350db93e6b14bd..032369e06db46d17aa9dc61a7f5f377dc5fcdf2d 100644
|
| --- a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc
|
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc
|
| @@ -885,6 +885,34 @@ void GLES2DecoderPassthroughImpl::UpdateTextureBinding(GLenum target,
|
| }
|
| }
|
|
|
| +error::Error GLES2DecoderPassthroughImpl::BindTexImage2DCHROMIUMImpl(
|
| + GLenum target,
|
| + GLenum internalformat,
|
| + GLint imageId) {
|
| + if (target != GL_TEXTURE_2D) {
|
| + InsertError(GL_INVALID_ENUM, "Invalid target");
|
| + return error::kNoError;
|
| + }
|
| +
|
| + gl::GLImage* image = image_manager_->LookupImage(imageId);
|
| + if (image == nullptr) {
|
| + InsertError(GL_INVALID_OPERATION, "No image found with the given ID");
|
| + return error::kNoError;
|
| + }
|
| +
|
| + if (internalformat) {
|
| + if (!image->BindTexImageWithInternalformat(target, internalformat)) {
|
| + image->CopyTexImage(target);
|
| + }
|
| + } else {
|
| + if (!image->BindTexImage(target)) {
|
| + image->CopyTexImage(target);
|
| + }
|
| + }
|
| +
|
| + return error::kNoError;
|
| +}
|
| +
|
| #define GLES2_CMD_OP(name) \
|
| { \
|
| &GLES2DecoderPassthroughImpl::Handle##name, cmds::name::kArgFlags, \
|
|
|