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

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

Issue 2728343002: Refactor CopyTexture method determination (Closed)
Patch Set: fix windows build Created 3 years, 9 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 | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc b/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc
index d310095abde33f891578a549c06f7921ccaad4f0..4ac99a4a32743af7d124b6ea67dea696ff640f21 100644
--- a/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc
+++ b/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc
@@ -718,16 +718,7 @@ void CopyTextureCHROMIUMResourceManager::DoCopyTexture(
bool premultiply_alpha,
bool unpremultiply_alpha,
CopyTextureMethod method) {
- bool premultiply_alpha_change = premultiply_alpha ^ unpremultiply_alpha;
- GLenum dest_binding_target =
- gpu::gles2::GLES2Util::GLFaceTargetToTextureTarget(dest_target);
-
- // GL_TEXTURE_RECTANGLE_ARB on FBO is supported by OpenGL, not GLES2,
- // so restrict this to GL_TEXTURE_2D and GL_TEXTURE_CUBE_MAP.
- if (source_target == GL_TEXTURE_2D &&
- (dest_binding_target == GL_TEXTURE_2D ||
- dest_binding_target == GL_TEXTURE_CUBE_MAP) &&
- !flip_y && !premultiply_alpha_change && method == DIRECT_COPY) {
+ if (method == DIRECT_COPY) {
DoCopyTexImage2D(decoder, source_target, source_id, source_level,
dest_target, dest_id, dest_level, dest_internal_format,
width, height, framebuffer_);
@@ -796,16 +787,7 @@ void CopyTextureCHROMIUMResourceManager::DoCopySubTexture(
bool premultiply_alpha,
bool unpremultiply_alpha,
CopyTextureMethod method) {
- bool premultiply_alpha_change = premultiply_alpha ^ unpremultiply_alpha;
- GLenum dest_binding_target =
- gpu::gles2::GLES2Util::GLFaceTargetToTextureTarget(dest_target);
-
- // GL_TEXTURE_RECTANGLE_ARB on FBO is supported by OpenGL, not GLES2,
- // so restrict this to GL_TEXTURE_2D and GL_TEXTURE_CUBE_MAP.
- if (source_target == GL_TEXTURE_2D &&
- (dest_binding_target == GL_TEXTURE_2D ||
- dest_binding_target == GL_TEXTURE_CUBE_MAP) &&
- !flip_y && !premultiply_alpha_change && method == DIRECT_COPY) {
+ if (method == DIRECT_COPY) {
DoCopyTexSubImage2D(decoder, source_target, source_id, source_level,
dest_target, dest_id, dest_level, xoffset, yoffset, x,
y, width, height, framebuffer_);
« no previous file with comments | « no previous file | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698