| Index: gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc
|
| diff --git a/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc b/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc
|
| index 91ce24e7c397572874a1109436e29acb9ed49f9b..111cf317ed3f2c47b0ed985905be6e83ce48b995 100644
|
| --- a/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc
|
| +++ b/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc
|
| @@ -419,6 +419,21 @@ void CopyTextureCHROMIUMResourceManager::DoCopyTexture(
|
| (source_internal_format == dest_internal_format &&
|
| source_internal_format != GL_BGRA_EXT) ||
|
| (source_internal_format == GL_RGBA && dest_internal_format == GL_RGB);
|
| + if (!source_format_contain_superset_of_dest_format) {
|
| + using GL = gles2::GLES2Util;
|
| + uint32_t source_channels = GL::GetChannelsForFormat(source_internal_format);
|
| + uint32_t dest_channels = GL::GetChannelsForFormat(dest_internal_format);
|
| + const gles2::FeatureInfo* info = decoder->GetFeatureInfo();
|
| + source_format_contain_superset_of_dest_format =
|
| + (GL::IsIntegerFormat(dest_internal_format) ==
|
| + GL::IsIntegerFormat(source_internal_format)) &&
|
| + (source_channels == dest_channels) &&
|
| + (((dest_channels == GL::kRed || dest_channels == GL::kAlpha ||
|
| + dest_channels == (GL::kRed | GL::kGreen)) &&
|
| + info->IsES3Capable()) ||
|
| + (dest_channels == GL::kRed && info->feature_flags().ext_texture_rg &&
|
| + !GL::IsIntegerFormat(dest_internal_format)));
|
| + }
|
| // GL_TEXTURE_RECTANGLE_ARB on FBO is supported by OpenGL, not GLES2,
|
| // so restrict this to GL_TEXTURE_2D.
|
| if (source_target == GL_TEXTURE_2D && dest_target == GL_TEXTURE_2D &&
|
|
|