| 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 1df4a70906f89f4e25ede6014b0bb9b624c5e8f2..974cbd7d8e0c7d85dd99dff0049b04019ec007e2 100644
|
| --- a/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc
|
| +++ b/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc
|
| @@ -367,12 +367,12 @@
|
| // format of internalformat.
|
| // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glCopyTexImage2D.xml
|
| bool source_format_contain_superset_of_dest_format =
|
| - source_internal_format == dest_internal_format ||
|
| + (source_internal_format == dest_internal_format &&
|
| + source_internal_format != GL_BGRA_EXT) ||
|
| (source_internal_format == GL_RGBA && dest_internal_format == GL_RGB);
|
| - // Note: GL_TEXTURE_RECTANGLE_ARB is only available if supported on FBOs.
|
| - bool valid_source_target = source_target == GL_TEXTURE_2D ||
|
| - source_target == GL_TEXTURE_RECTANGLE_ARB;
|
| - if (valid_source_target && !flip_y && !premultiply_alpha_change &&
|
| + // 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 && !flip_y && !premultiply_alpha_change &&
|
| source_format_contain_superset_of_dest_format) {
|
| DoCopyTexImage2D(decoder,
|
| source_target,
|
| @@ -417,12 +417,12 @@
|
| // format of internalformat.
|
| // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glCopyTexImage2D.xml
|
| bool source_format_contain_superset_of_dest_format =
|
| - source_internal_format == dest_internal_format ||
|
| + (source_internal_format == dest_internal_format &&
|
| + source_internal_format != GL_BGRA_EXT) ||
|
| (source_internal_format == GL_RGBA && dest_internal_format == GL_RGB);
|
| - // Note: GL_TEXTURE_RECTANGLE_ARB is only available if supported on FBOs.
|
| - bool valid_source_target = source_target == GL_TEXTURE_2D ||
|
| - source_target == GL_TEXTURE_RECTANGLE_ARB;
|
| - if (valid_source_target && !flip_y && !premultiply_alpha_change &&
|
| + // 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 && !flip_y && !premultiply_alpha_change &&
|
| source_format_contain_superset_of_dest_format) {
|
| DoCopyTexSubImage2D(decoder, source_target, source_id, dest_id, xoffset,
|
| yoffset, x, y, width, height, framebuffer_);
|
|
|