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

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

Issue 13620008: Enable 2D Canvas painting for Chrome on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing scherkus's comments. 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_copy_texture_chromium.h
diff --git a/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h b/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h
index 2d607bf556c79a9ffb1527b6ba35727bd802b468..e0752ccc2aeae8e80e2854d20c177d3b09ba06f9 100644
--- a/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h
+++ b/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h
@@ -31,6 +31,16 @@ class GPU_EXPORT CopyTextureCHROMIUMResourceManager {
bool flip_y, bool premultiply_alpha,
bool unpremultiply_alpha);
+ // This will apply a transform on the source texture before copying to
+ // destination texture.
+ void DoCopyTextureWithTransform(const gles2::GLES2Decoder* decoder,
+ GLenum source_target, GLenum dest_target,
+ GLuint source_id, GLuint dest_id, GLint level,
+ GLsizei width, GLsizei height, bool flip_y,
+ bool premultiply_alpha,
+ bool unpremultiply_alpha,
+ const GLfloat transform_matrix[16]);
+
// The attributes used during invocation of the extension.
static const GLuint kVertexPositionAttrib = 0;
@@ -41,6 +51,7 @@ class GPU_EXPORT CopyTextureCHROMIUMResourceManager {
GLuint programs_[kNumPrograms];
GLuint buffer_id_;
GLuint framebuffer_;
+ GLuint matrix_handle_[kNumPrograms];
GLuint sampler_locations_[kNumPrograms];
DISALLOW_COPY_AND_ASSIGN(CopyTextureCHROMIUMResourceManager);

Powered by Google App Engine
This is Rietveld 408576698