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 515a825aaedef5a4becfea456eb0212b8aa51679..7a1bbf69d3f2e68e0f96f6dc2b477cdd669f7232 100644 |
| --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc |
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc |
| @@ -11397,26 +11397,6 @@ void GLES2DecoderImpl::DoCopyTexSubImage2D( |
| texture_manager()->SetLevelCleared(texture_ref, target, level, true); |
| } |
| - if (copyX != x || |
| - copyY != y || |
| - copyWidth != width || |
| - copyHeight != height) { |
| - // some part was clipped so clear the sub rect. |
| - uint32_t pixels_size = 0; |
| - if (!GLES2Util::ComputeImageDataSizes( |
| - width, height, 1, format, type, state_.unpack_alignment, &pixels_size, |
| - NULL, NULL)) { |
| - LOCAL_SET_GL_ERROR( |
| - GL_INVALID_VALUE, "glCopyTexSubImage2D", "dimensions too large"); |
| - return; |
| - } |
| - scoped_ptr<char[]> zero(new char[pixels_size]); |
| - memset(zero.get(), 0, pixels_size); |
| - glTexSubImage2D( |
| - target, level, xoffset, yoffset, width, height, |
| - format, type, zero.get()); |
| - } |
|
Zhenyao Mo
2016/01/14 18:13:37
Look at the code above SetLevelClearedRect(), sinc
qiankun
2016/01/19 16:07:31
Thanks for pointing this. I updated the CL. PTAL.
|
| - |
| if (copyHeight > 0 && copyWidth > 0) { |
| GLint dx = copyX - x; |
| GLint dy = copyY - y; |