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); |
+ } |
+ 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 = |