| 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 ffb9370bca76f071a1a3619a96e9a858007bafda..49bba9b49de15d8c691c0c5a99253c2555b7b22e 100644
|
| --- a/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc
|
| +++ b/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc
|
| @@ -218,7 +218,6 @@ void DoCopyTexImage2D(const gpu::gles2::GLES2Decoder* decoder,
|
| GLuint source_id,
|
| GLuint dest_id,
|
| GLint dest_level,
|
| - GLenum dest_internal_format,
|
| GLsizei width,
|
| GLsizei height,
|
| GLuint framebuffer) {
|
| @@ -231,14 +230,8 @@ void DoCopyTexImage2D(const gpu::gles2::GLES2Decoder* decoder,
|
| glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
| glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
| glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
| - glCopyTexImage2D(GL_TEXTURE_2D,
|
| - dest_level,
|
| - dest_internal_format,
|
| - 0 /* x */,
|
| - 0 /* y */,
|
| - width,
|
| - height,
|
| - 0 /* border */);
|
| + glCopyTexSubImage2D(GL_TEXTURE_2D, dest_level, 0 /* xoffset */,
|
| + 0 /* yoffset */, 0 /* x */, 0 /* y */, width, height);
|
| }
|
|
|
| decoder->RestoreTextureState(source_id);
|
| @@ -332,16 +325,15 @@ void CopyTextureCHROMIUMResourceManager::DoCopyTexture(
|
| bool source_format_contain_superset_of_dest_format =
|
| source_internal_format == dest_internal_format ||
|
| (source_internal_format == GL_RGBA && dest_internal_format == GL_RGB);
|
| - // 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 &&
|
| + bool source_target_allowed = source_target == GL_TEXTURE_2D ||
|
| + source_target == GL_TEXTURE_RECTANGLE_ARB;
|
| + if (source_target_allowed && !flip_y && !premultiply_alpha_change &&
|
| source_format_contain_superset_of_dest_format) {
|
| DoCopyTexImage2D(decoder,
|
| source_target,
|
| source_id,
|
| dest_id,
|
| dest_level,
|
| - dest_internal_format,
|
| width,
|
| height,
|
| framebuffer_);
|
|
|