| 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 7722442b4f8d818c5a40b26b2133e025f8698a9d..c4361c179f5de0c8c9419c8f8ac5db16ff808316 100644
|
| --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| @@ -9864,15 +9864,36 @@ void GLES2DecoderImpl::DoCopyTextureCHROMIUM(
|
| dest_texture, GL_TEXTURE_2D, level, true);
|
| }
|
|
|
| - copy_texture_CHROMIUM_->DoCopyTexture(this,
|
| - source_texture->target(),
|
| - dest_texture->target(),
|
| - source_texture->service_id(),
|
| - dest_texture->service_id(), level,
|
| - source_width, source_height,
|
| - unpack_flip_y_,
|
| - unpack_premultiply_alpha_,
|
| - unpack_unpremultiply_alpha_);
|
| + // GL_TEXTURE_EXTERNAL_OES texture requires apply a transform matrix
|
| + // before presenting.
|
| + if (source_texture->target() == GL_TEXTURE_EXTERNAL_OES) {
|
| + // TODO(hkuang): get the StreamTexture transform matrix in GPU process
|
| + // instead of using default matrix crbug.com/226218.
|
| + const GLfloat default_matrix[16] = {1.0f, 0.0f, 0.0f, 0.0f,
|
| + 0.0f, 1.0f, 0.0f, 0.0f,
|
| + 0.0f, 0.0f, 1.0f, 0.0f,
|
| + 0.0f, 0.0f, 0.0f, 1.0f };
|
| + copy_texture_CHROMIUM_->DoCopyTextureWithTransform(this,
|
| + source_texture->target(),
|
| + dest_texture->target(),
|
| + source_texture->service_id(),
|
| + dest_texture->service_id(), level,
|
| + source_width, source_height,
|
| + unpack_flip_y_,
|
| + unpack_premultiply_alpha_,
|
| + unpack_unpremultiply_alpha_,
|
| + default_matrix);
|
| + } else {
|
| + copy_texture_CHROMIUM_->DoCopyTexture(this,
|
| + source_texture->target(),
|
| + dest_texture->target(),
|
| + source_texture->service_id(),
|
| + dest_texture->service_id(), level,
|
| + source_width, source_height,
|
| + unpack_flip_y_,
|
| + unpack_premultiply_alpha_,
|
| + unpack_unpremultiply_alpha_);
|
| + }
|
| }
|
|
|
| static GLenum ExtractTypeFromStorageFormat(GLenum internalformat) {
|
|
|