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 866c3a35d5c34ad64765c9f21ff05b3e8e948332..d81ad1996651396cfda14d71b9af5dab4018ee35 100644 |
| --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc |
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc |
| @@ -13044,9 +13044,9 @@ void GLES2DecoderImpl::DoCopyTexImage2D( |
| GLint destX = dx; |
| GLint destY = dy; |
| if (requires_luma_blit) { |
| - copy_tex_image_blit_->DoCopyTexSubImage2DToLUMACompatibilityTexture( |
| + copy_tex_image_blit_->DoCopyTexSubImageToLUMACompatibilityTexture( |
| this, texture->service_id(), texture->target(), target, format, |
| - type, level, destX, destY, copyX, copyY, copyWidth, copyHeight, |
| + type, level, destX, destY, 0, copyX, copyY, copyWidth, copyHeight, |
| GetBoundReadFrameBufferServiceId(), |
| GetBoundReadFrameBufferInternalFormat()); |
| } else { |
| @@ -13218,9 +13218,10 @@ void GLES2DecoderImpl::DoCopyTexSubImage2D( |
| if (!InitializeCopyTexImageBlitter("glCopyTexSubImage2D")) { |
| return; |
| } |
| - copy_tex_image_blit_->DoCopyTexSubImage2DToLUMACompatibilityTexture( |
| + copy_tex_image_blit_->DoCopyTexSubImageToLUMACompatibilityTexture( |
| this, texture->service_id(), texture->target(), target, |
| - internal_format, type, level, xoffset, yoffset, x, y, width, height, |
| + internal_format, type, level, xoffset, yoffset, 0, |
| + copyX, copyY, copyWidth, copyHeight, |
| GetBoundReadFrameBufferServiceId(), |
| GetBoundReadFrameBufferInternalFormat()); |
| } else { |
| @@ -13307,12 +13308,22 @@ void GLES2DecoderImpl::DoCopyTexSubImage3D( |
| DCHECK(texture->IsLevelCleared(target, level)); |
| } |
| - // TODO(yunchao): Follow-up CLs are necessary. For instance: |
| - // 1. emulation of unsized formats in core profile |
| - |
| if (copyHeight > 0 && copyWidth > 0) { |
| - glCopyTexSubImage3D(target, level, destX, destY, zoffset, |
| - copyX, copyY, copyWidth, copyHeight); |
| + if (CopyTexImageResourceManager::CopyTexImageRequiresBlit( |
| + feature_info_.get(), internal_format)) { |
| + if (!InitializeCopyTexImageBlitter(func_name)) { |
| + return; |
| + } |
| + copy_tex_image_blit_->DoCopyTexSubImageToLUMACompatibilityTexture( |
| + this, texture->service_id(), texture->target(), target, |
| + internal_format, type, level, xoffset, yoffset, zoffset, |
|
Zhenyao Mo
2016/08/22 17:57:15
Same question, should xoffset/yoffset be destX/des
yunchao
2016/08/23 13:32:17
You are right.
|
| + copyX, copyY, copyWidth, copyHeight, |
| + GetBoundReadFrameBufferServiceId(), |
| + GetBoundReadFrameBufferInternalFormat()); |
| + } else { |
| + glCopyTexSubImage3D(target, level, destX, destY, zoffset, |
| + copyX, copyY, copyWidth, copyHeight); |
| + } |
| } |
| // This may be a slow command. Exit command processing to allow for |