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

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

Issue 1140683002: glBindTexImage2DCHROMIUM should retain pixel format. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add GetInternalFormat override to MockGLImage. Created 5 years, 7 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
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 a22c2f9b83e6f863d1d0e213dba7c857b685e56f..3979f58c03eea81d8214af4bc0f1d46eac87fdf0 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -12459,8 +12459,9 @@ void GLES2DecoderImpl::DoBindTexImage2DCHROMIUM(
gfx::Size size = gl_image->GetSize();
texture_manager()->SetLevelInfo(
- texture_ref, target, 0, GL_RGBA, size.width(), size.height(), 1, 0,
- GL_RGBA, GL_UNSIGNED_BYTE, true);
+ texture_ref, target, 0, gl_image->GetInternalFormat(),
+ size.width(), size.height(), 1, 0,
+ gl_image->GetInternalFormat(), GL_UNSIGNED_BYTE, true);
texture_manager()->SetLevelImage(texture_ref, target, 0, gl_image);
}
@@ -12498,8 +12499,8 @@ void GLES2DecoderImpl::DoReleaseTexImage2DCHROMIUM(
}
texture_manager()->SetLevelInfo(
- texture_ref, target, 0, GL_RGBA, 0, 0, 1, 0,
- GL_RGBA, GL_UNSIGNED_BYTE, false);
+ texture_ref, target, 0, gl_image->GetInternalFormat(), 0, 0, 1, 0,
+ gl_image->GetInternalFormat(), GL_UNSIGNED_BYTE, false);
}
error::Error GLES2DecoderImpl::HandleTraceBeginCHROMIUM(
« no previous file with comments | « content/common/gpu/stream_texture_android.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698