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

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

Issue 1547873002: Allow GL_TEXTURE_RECTANGLE_ARB to be the destination target for copyTextureCHROMIUM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase against https://codereview.chromium.org/1551143002/. Created 4 years, 12 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 f5ecaffd8596a7bc7c88e4d0d2ab1ce5ee728ad5..4d68487ab9be0168ec128f607908e8e9cfe1394a 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -13082,7 +13082,8 @@ bool GLES2DecoderImpl::ValidateCopyTextureCHROMIUM(
return false;
}
- if (dest_texture->target() != GL_TEXTURE_2D ||
+ if ((dest_texture->target() != GL_TEXTURE_2D &&
+ dest_texture->target() != GL_TEXTURE_RECTANGLE_ARB) ||
Zhenyao Mo 2016/01/04 22:43:54 nit: maybe use two switch statements here? Looks
erikchen 2016/01/04 23:28:52 Done.
(source_texture->target() != GL_TEXTURE_2D &&
source_texture->target() != GL_TEXTURE_RECTANGLE_ARB &&
source_texture->target() != GL_TEXTURE_EXTERNAL_OES)) {
@@ -13316,7 +13317,7 @@ void GLES2DecoderImpl::DoCopyTextureCHROMIUM(
// instead of using kIdentityMatrix crbug.com/226218.
copy_texture_CHROMIUM_->DoCopyTextureWithTransform(
this, source_target, source_texture->service_id(),
- dest_texture->service_id(), source_width, source_height,
+ dest_target, dest_texture->service_id(), source_width, source_height,
unpack_flip_y == GL_TRUE,
unpack_premultiply_alpha == GL_TRUE,
unpack_unmultiply_alpha == GL_TRUE,
@@ -13324,8 +13325,8 @@ void GLES2DecoderImpl::DoCopyTextureCHROMIUM(
} else {
copy_texture_CHROMIUM_->DoCopyTexture(
this, source_target, source_texture->service_id(),
- source_internal_format, dest_texture->service_id(), internal_format,
- source_width, source_height,
+ source_internal_format, dest_target, dest_texture->service_id(),
+ internal_format, source_width, source_height,
unpack_flip_y == GL_TRUE,
unpack_premultiply_alpha == GL_TRUE,
unpack_unmultiply_alpha == GL_TRUE);
@@ -13488,8 +13489,8 @@ void GLES2DecoderImpl::DoCopySubTextureCHROMIUM(
// TODO(hkuang): get the StreamTexture transform matrix in GPU process.
// crbug.com/226218.
copy_texture_CHROMIUM_->DoCopySubTexture(
- this, source_target, source_texture->service_id(),
- source_internal_format, dest_texture->service_id(), dest_internal_format,
+ this, source_target, source_texture->service_id(), source_internal_format,
+ dest_target, dest_texture->service_id(), dest_internal_format,
xoffset, yoffset, x, y, width, height, dest_width, dest_height,
source_width, source_height,
unpack_flip_y == GL_TRUE,
@@ -13663,13 +13664,14 @@ void GLES2DecoderImpl::DoCompressedCopyTextureCHROMIUM(GLenum target,
// instead of using kIdentityMatrix crbug.com/226218.
copy_texture_CHROMIUM_->DoCopyTextureWithTransform(
this, source_texture->target(), source_texture->service_id(),
- dest_texture->service_id(), source_width, source_height,
- false, false, false, kIdentityMatrix);
+ dest_texture->target(), dest_texture->service_id(), source_width,
+ source_height, false, false, false, kIdentityMatrix);
} else {
copy_texture_CHROMIUM_->DoCopyTexture(
this, source_texture->target(), source_texture->service_id(),
- source_internal_format, dest_texture->service_id(), GL_RGBA,
- source_width, source_height, false, false, false);
+ source_internal_format, dest_texture->target(),
+ dest_texture->service_id(), GL_RGBA, source_width, source_height, false,
+ false, false);
}
}
@@ -13859,7 +13861,7 @@ void GLES2DecoderImpl::DoCompressedCopySubTextureCHROMIUM(GLenum target,
copy_texture_CHROMIUM_->DoCopyTexture(
this, dest_texture->target(), dest_texture->service_id(),
- dest_internal_format, tmp_service_id, GL_RGBA,
+ dest_internal_format, GL_TEXTURE_2D, tmp_service_id, GL_RGBA,
dest_width, dest_height, false, false, false);
// Redefine destination texture to use RGBA.
@@ -13877,7 +13879,7 @@ void GLES2DecoderImpl::DoCompressedCopySubTextureCHROMIUM(GLenum target,
copy_texture_CHROMIUM_->DoCopyTexture(
this, GL_TEXTURE_2D, tmp_service_id, GL_RGBA,
- dest_texture->service_id(), GL_RGBA,
+ dest_texture->target(), dest_texture->service_id(), GL_RGBA,
dest_width, dest_height, false, false, false);
glDeleteTextures(1, &tmp_service_id);
@@ -13887,9 +13889,10 @@ void GLES2DecoderImpl::DoCompressedCopySubTextureCHROMIUM(GLenum target,
// crbug.com/226218.
copy_texture_CHROMIUM_->DoCopySubTexture(
this, source_texture->target(), source_texture->service_id(),
- source_internal_format, dest_texture->service_id(), GL_RGBA,
- xoffset, yoffset, x, y, width, height, dest_width, dest_height,
- source_width, source_height, false, false, false);
+ source_internal_format, dest_texture->target(),
+ dest_texture->service_id(), GL_RGBA, xoffset, yoffset, x, y, width,
+ height, dest_width, dest_height, source_width, source_height, false,
+ false, false);
}
void GLES2DecoderImpl::DoTexStorage2DEXT(

Powered by Google App Engine
This is Rietveld 408576698