Chromium Code Reviews| 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 992ad25f100b7d5cf2fd7f3381e741acfe19b34e..2c192ed60c97b9adc311cfe6fc1e207d42c662df 100644 |
| --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc |
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc |
| @@ -16425,6 +16425,13 @@ CopyTextureMethod GLES2DecoderImpl::getCopyTextureCHROMIUMMethod( |
| Texture::ColorRenderable(GetFeatureInfo(), dest_internal_format, false); |
| std::string output_error_msg; |
| + // Make sure source_type has value for unsized source internalformat. |
| + if (!GLES2Util::IsSizedColorFormat(source_internal_format) && !source_type) { |
| + source_type = |
| + TextureManager::ExtractTypeFromStorageFormat(source_internal_format); |
| + } |
|
qiankun
2017/03/09 08:53:02
This code can be removed once the issue in https:/
Zhenyao Mo
2017/03/10 00:10:23
Can you add it into a TODO in the code? Otherwise
qiankun
2017/03/10 02:48:04
Done.
|
| + DCHECK(GLES2Util::IsSizedColorFormat(source_internal_format) || source_type); |
| + |
| // CopyTexImage* should not allow internalformat of GL_BGRA_EXT and |
| // GL_BGRA8_EXT. crbug.com/663086. |
| bool copy_tex_image_format_valid = |