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

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

Issue 1547873002: Allow GL_TEXTURE_RECTANGLE_ARB to be the destination target for copyTextureCHROMIUM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments from kbr. Created 4 years, 11 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 bbd215e77f84c6ce79667a1a887d0d91ae45da8e..59014c388113fad83c9bdd9076927cf6ba651659 100644
--- a/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h
+++ b/gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h
@@ -35,6 +35,7 @@ class GPU_EXPORT CopyTextureCHROMIUMResourceManager {
GLenum source_target,
GLuint source_id,
GLenum source_internal_format,
+ GLenum dest_target,
GLuint dest_id,
GLenum dest_internal_format,
GLsizei width,
@@ -47,6 +48,7 @@ class GPU_EXPORT CopyTextureCHROMIUMResourceManager {
GLenum source_target,
GLuint source_id,
GLenum source_internal_format,
+ GLenum dest_target,
GLuint dest_id,
GLenum dest_internal_format,
GLint xoffset,
@@ -70,6 +72,7 @@ class GPU_EXPORT CopyTextureCHROMIUMResourceManager {
void DoCopyTextureWithTransform(const gles2::GLES2Decoder* decoder,
GLenum source_target,
GLuint source_id,
+ GLenum dest_target,
GLuint dest_id,
GLsizei width,
GLsizei height,
@@ -85,21 +88,33 @@ class GPU_EXPORT CopyTextureCHROMIUMResourceManager {
struct ProgramInfo {
ProgramInfo()
: program(0u),
- vertex_translate_handle(0u),
+ vertex_dest_mult_handle(0u),
+ vertex_dest_add_handle(0u),
+ vertex_source_mult_handle(0u),
+ vertex_source_add_handle(0u),
tex_coord_transform_handle(0u),
- half_size_handle(0u),
sampler_handle(0u) {}
GLuint program;
- GLuint vertex_translate_handle;
+
+ // Transformations that map from the original quad coordinates [-1, 1] into
+ // the destination texture's quad coordinates.
+ GLuint vertex_dest_mult_handle;
+ GLuint vertex_dest_add_handle;
+
+ // Transformations that map from the original quad coordinates [-1, 1] into
+ // the source texture's texture coordinates.
+ GLuint vertex_source_mult_handle;
+ GLuint vertex_source_add_handle;
+
GLuint tex_coord_transform_handle;
- GLuint half_size_handle;
GLuint sampler_handle;
};
void DoCopyTextureInternal(const gles2::GLES2Decoder* decoder,
GLenum source_target,
GLuint source_id,
+ GLenum dest_target,
GLuint dest_id,
GLint xoffset,
GLint yoffset,
@@ -118,9 +133,9 @@ class GPU_EXPORT CopyTextureCHROMIUMResourceManager {
bool initialized_;
typedef std::vector<GLuint> ShaderVector;
- ShaderVector vertex_shaders_;
+ GLuint vertex_shader_;
ShaderVector fragment_shaders_;
- typedef std::pair<int, int> ProgramMapKey;
+ typedef int ProgramMapKey;
typedef base::hash_map<ProgramMapKey, ProgramInfo> ProgramMap;
ProgramMap programs_;
GLuint buffer_id_;
« no previous file with comments | « gpu/GLES2/extensions/CHROMIUM/CHROMIUM_copy_texture.txt ('k') | gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698