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

Unified Diff: third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp

Issue 2738163002: Enable CopyTextureCHROMIUM in Blink for Tex{Sub}Image2D with more cases (Closed)
Patch Set: rebase only--blink renaming and formatting Created 3 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: third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
index 06240a57cb0e30f073769a669390217f4585e44d..25771014db24682c42916094374a3c966d58c419 100644
--- a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
+++ b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
@@ -693,10 +693,8 @@ bool DrawingBuffer::Initialize(const IntSize& size, bool use_multisampling) {
}
bool DrawingBuffer::CopyToPlatformTexture(gpu::gles2::GLES2Interface* gl,
+ GLenum texture_target,
GLuint texture,
- GLenum internal_format,
- GLenum dest_type,
- GLint level,
bool premultiply_alpha,
bool flip_y,
const IntPoint& dest_texture_offset,
@@ -709,9 +707,7 @@ bool DrawingBuffer::CopyToPlatformTexture(gpu::gles2::GLES2Interface* gl,
gl_->Flush();
}
- // Assume that the destination target is GL_TEXTURE_2D.
- if (!Extensions3DUtil::CanUseCopyTextureCHROMIUM(
- GL_TEXTURE_2D, internal_format, dest_type, level))
+ if (!Extensions3DUtil::CanUseCopyTextureCHROMIUM(texture_target))
return false;
// Contexts may be in a different share group. We must transfer the texture
@@ -750,7 +746,7 @@ bool DrawingBuffer::CopyToPlatformTexture(gpu::gles2::GLES2Interface* gl,
unpack_premultiply_alpha_needed = GL_TRUE;
gl->CopySubTextureCHROMIUM(
- source_texture, 0, GL_TEXTURE_2D, texture, 0, dest_texture_offset.X(),
+ source_texture, 0, texture_target, texture, 0, dest_texture_offset.X(),
dest_texture_offset.Y(), source_sub_rectangle.X(),
source_sub_rectangle.Y(), source_sub_rectangle.Width(),
source_sub_rectangle.Height(), flip_y, unpack_premultiply_alpha_needed,

Powered by Google App Engine
This is Rietveld 408576698