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

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

Issue 2479513002: Reland of Extend CopyTextureCHROMIUM to more ES 3.0 texture formats. (Closed)
Patch Set: rebase and minor fix for premultiply and un-premultiply alpha Created 4 years, 1 month 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 dd705323badecb1833e85a8da0353fb8b1dbd7f3..22f4a0af0dd600b75a1e7c110d3ca71275634229 100644
--- a/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h
+++ b/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h
@@ -18,6 +18,13 @@ namespace gles2 {
class GLES2Decoder;
+enum SupportedCopyMethodByFormat {
+ DIRECT_COPY,
+ DIRECT_DRAW,
+ DRAW_AND_COPY,
+ NONE_COPY
+};
+
// This class encapsulates the resources required to implement the
// GL_CHROMIUM_copy_texture extension. The copy operation is performed
// via glCopyTexImage2D() or a blit to a framebuffer object.
@@ -42,7 +49,8 @@ class GPU_EXPORT CopyTextureCHROMIUMResourceManager {
GLsizei height,
bool flip_y,
bool premultiply_alpha,
- bool unpremultiply_alpha);
+ bool unpremultiply_alpha,
+ SupportedCopyMethodByFormat method);
void DoCopySubTexture(const gles2::GLES2Decoder* decoder,
GLenum source_target,
@@ -63,7 +71,8 @@ class GPU_EXPORT CopyTextureCHROMIUMResourceManager {
GLsizei source_height,
bool flip_y,
bool premultiply_alpha,
- bool unpremultiply_alpha);
+ bool unpremultiply_alpha,
+ SupportedCopyMethodByFormat method);
void DoCopySubTextureWithTransform(const gles2::GLES2Decoder* decoder,
GLenum source_target,
@@ -94,8 +103,10 @@ class GPU_EXPORT CopyTextureCHROMIUMResourceManager {
void DoCopyTextureWithTransform(const gles2::GLES2Decoder* decoder,
GLenum source_target,
GLuint source_id,
+ GLenum source_format,
GLenum dest_target,
GLuint dest_id,
+ GLenum dest_format,
GLsizei width,
GLsizei height,
bool flip_y,
@@ -136,8 +147,10 @@ class GPU_EXPORT CopyTextureCHROMIUMResourceManager {
void DoCopyTextureInternal(const gles2::GLES2Decoder* decoder,
GLenum source_target,
GLuint source_id,
+ GLenum source_format,
GLenum dest_target,
GLuint dest_id,
+ GLenum dest_format,
GLint xoffset,
GLint yoffset,
GLint x,

Powered by Google App Engine
This is Rietveld 408576698