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 17290f8ed22f35fb2f8c69119a4e41af96a67a75..7db69502e8821ce3a7838b91702836f496dfc9b4 100644 |
--- a/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h |
+++ b/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h |
@@ -20,7 +20,8 @@ class GLES2Decoder; |
// This class encapsulates the resources required to implement the |
// GL_CHROMIUM_copy_texture extension. The copy operation is performed |
-// via a blit to a framebuffer object. |
+// via glCopyTexImage2D() or a blit to a framebuffer object. |
+// The target of |dest_id| texture must be GL_TEXTURE_2D. |
class GPU_EXPORT CopyTextureCHROMIUMResourceManager { |
public: |
CopyTextureCHROMIUMResourceManager(); |
@@ -29,18 +30,31 @@ class GPU_EXPORT CopyTextureCHROMIUMResourceManager { |
void Initialize(const gles2::GLES2Decoder* decoder); |
void Destroy(); |
- void DoCopyTexture(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, |
+ void DoCopyTexture(const gles2::GLES2Decoder* decoder, |
+ GLenum source_target, |
+ GLuint source_id, |
+ GLuint dest_id, |
+ GLint level, |
+ GLenum internal_format, |
+ GLsizei width, |
+ GLsizei height, |
+ bool flip_y, |
+ bool premultiply_alpha, |
bool unpremultiply_alpha); |
// This will apply a transform on the source texture before copying to |
- // destination texture. |
+ // destination texture. |level| and |internal_format| are of |dest_id| |
+ // texture. |internal_format| specifies the internal format of the texture. |
+ // e.g. GL_RGBA, GL_RGB |
reveman
2014/07/10 20:20:49
nit: this applies to DoCopyTexture as well. maybe
dshwang
2014/07/10 22:08:22
Thank you for detail suggestions. I chose the seco
|
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, |
+ GLenum source_target, |
+ GLuint source_id, |
+ GLuint dest_id, |
+ GLint level, |
+ GLenum internal_format, |
+ GLsizei width, |
+ GLsizei height, |
+ bool flip_y, |
bool premultiply_alpha, |
bool unpremultiply_alpha, |
const GLfloat transform_matrix[16]); |