Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 2068033002: Do not use IOSurface copyTexImage2D workaround for LUMA formats. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments from zmo. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 bafcfa05d0056a7cb46436f2f63cf0457ade5c10..b716aedf79775c37cfd63337615afe79483796e7 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -12437,8 +12437,14 @@ void GLES2DecoderImpl::DoCopyTexImage2D(
bool use_workaround = NeedsCopyTextureImageWorkaround(
final_internal_format, channels_exist, &source_texture_service_id,
&source_texture_target);
- if (use_workaround) {
- DCHECK(!requires_luma_blit);
+ if (requires_luma_blit) {
+ copy_tex_image_blit_->DoCopyTexImage2DToLUMAComatabilityTexture(
+ this, texture->service_id(), texture->target(), target, format,
+ type, level, internal_format, copyX, copyY, copyWidth, copyHeight,
+ framebuffer_state_.bound_read_framebuffer->service_id(),
+ framebuffer_state_.bound_read_framebuffer
+ ->GetReadBufferInternalFormat());
+ } else if (use_workaround) {
GLenum dest_texture_target = target;
GLenum framebuffer_target = features().chromium_framebuffer_multisample
? GL_READ_FRAMEBUFFER_EXT
@@ -12479,17 +12485,8 @@ void GLES2DecoderImpl::DoCopyTexImage2D(
glDeleteTextures(1, &temp_texture);
} else {
- if (requires_luma_blit) {
- copy_tex_image_blit_->DoCopyTexImage2DToLUMAComatabilityTexture(
- this, texture->service_id(), texture->target(), target, format,
- type, level, internal_format, copyX, copyY, copyWidth, copyHeight,
- framebuffer_state_.bound_read_framebuffer->service_id(),
- framebuffer_state_.bound_read_framebuffer
- ->GetReadBufferInternalFormat());
- } else {
- glCopyTexImage2D(target, level, final_internal_format, copyX, copyY,
- copyWidth, copyHeight, border);
- }
+ glCopyTexImage2D(target, level, final_internal_format, copyX, copyY,
+ copyWidth, copyHeight, border);
}
}
GLenum error = LOCAL_PEEK_GL_ERROR(func_name);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698