| 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 7a0243a18d839a4f260dec14eee529a14ddd6c34..3d155d242fc2aace163adbf8cb4406c94938ce34 100644
|
| --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| @@ -4791,7 +4791,9 @@ void GLES2DecoderImpl::TakeFrontBuffer(const Mailbox& mailbox) {
|
| }
|
|
|
| void GLES2DecoderImpl::ReturnFrontBuffer(const Mailbox& mailbox, bool is_lost) {
|
| - Texture* texture = mailbox_manager()->ConsumeTexture(mailbox);
|
| + TextureBase* texture_base = mailbox_manager()->ConsumeTexture(mailbox);
|
| + Texture* texture = texture_base ? texture_base->AsTexture() : nullptr;
|
| +
|
| for (auto it = saved_back_textures_.begin(); it != saved_back_textures_.end();
|
| ++it) {
|
| if (texture != it->back_texture->texture_ref()->texture())
|
| @@ -16051,7 +16053,10 @@ void GLES2DecoderImpl::DoConsumeTextureCHROMIUM(GLenum target,
|
| "glConsumeTextureCHROMIUM", "unknown texture for target");
|
| return;
|
| }
|
| - Texture* texture = group_->mailbox_manager()->ConsumeTexture(mailbox);
|
| +
|
| + TextureBase* texture_base =
|
| + group_->mailbox_manager()->ConsumeTexture(mailbox);
|
| + Texture* texture = texture_base ? texture_base->AsTexture() : nullptr;
|
| if (!texture) {
|
| LOCAL_SET_GL_ERROR(
|
| GL_INVALID_OPERATION,
|
| @@ -16111,7 +16116,9 @@ void GLES2DecoderImpl::DoCreateAndConsumeTextureINTERNAL(
|
| "glCreateAndConsumeTextureCHROMIUM", "client id already in use");
|
| return;
|
| }
|
| - Texture* texture = group_->mailbox_manager()->ConsumeTexture(mailbox);
|
| + TextureBase* texture_base =
|
| + group_->mailbox_manager()->ConsumeTexture(mailbox);
|
| + Texture* texture = texture_base ? texture_base->AsTexture() : nullptr;
|
| if (!texture) {
|
| EnsureTextureForClientId(target, client_id);
|
| LOCAL_SET_GL_ERROR(
|
|
|