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

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

Issue 13613006: Add a new parameter dest_type to the GL_CHROMIUM_copy_texture extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase the patch and solve the merge conflict issue Created 7 years, 8 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 55ea6d5ff564d4a661296e7a2fdcacc0a73639d7..38be722b82f657e368275e1d773e58524f604eaa 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -911,7 +911,8 @@ class GLES2DecoderImpl : public GLES2Decoder {
GLuint source_id,
GLuint target_id,
GLint level,
- GLenum internal_format);
+ GLenum internal_format,
+ GLenum dest_type);
// Wrapper for TexStorage2DEXT.
void DoTexStorage2DEXT(
@@ -9618,7 +9619,7 @@ static GLenum ExtractFormatFromStorageFormat(GLenum internalformat) {
void GLES2DecoderImpl::DoCopyTextureCHROMIUM(
GLenum target, GLuint source_id, GLuint dest_id, GLint level,
- GLenum internal_format) {
+ GLenum internal_format, GLenum dest_type) {
Texture* dest_texture = GetTexture(dest_id);
Texture* source_texture = GetTexture(source_id);
@@ -9684,18 +9685,14 @@ void GLES2DecoderImpl::DoCopyTextureCHROMIUM(
return;
}
- GLenum dest_type;
+ GLenum dest_type_previous;
GLenum dest_internal_format;
bool dest_level_defined = dest_texture->GetLevelSize(
GL_TEXTURE_2D, level, &dest_width, &dest_height);
if (dest_level_defined) {
- dest_texture->GetLevelType(GL_TEXTURE_2D, level, &dest_type,
+ dest_texture->GetLevelType(GL_TEXTURE_2D, level, &dest_type_previous,
&dest_internal_format);
- } else {
- GLenum source_internal_format;
- source_texture->GetLevelType(GL_TEXTURE_2D, 0, &dest_type,
- &source_internal_format);
}
// Set source texture's width and height to be the same as
@@ -9708,7 +9705,8 @@ void GLES2DecoderImpl::DoCopyTextureCHROMIUM(
// Resize the destination texture to the dimensions of the source texture.
if (!dest_level_defined || dest_width != source_width ||
dest_height != source_height ||
- dest_internal_format != internal_format) {
+ dest_internal_format != internal_format ||
+ dest_type_previous != dest_type) {
// Ensure that the glTexImage2D succeeds.
LOCAL_COPY_REAL_GL_ERRORS_TO_WRAPPER("glCopyTextureCHROMIUM");
glBindTexture(GL_TEXTURE_2D, dest_texture->service_id());
« no previous file with comments | « gpu/command_buffer/common/gles2_cmd_format_test_autogen.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698