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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h

Issue 2623863002: Support level > 0 for CopyTextureCHROMIUM extension (Closed)
Patch Set: skip dest_level > 0 on Android Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_COPY_TEXTURE_CHROMIUM_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_COPY_TEXTURE_CHROMIUM_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_COPY_TEXTURE_CHROMIUM_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_COPY_TEXTURE_CHROMIUM_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 CopyTextureCHROMIUMResourceManager(); 49 CopyTextureCHROMIUMResourceManager();
50 ~CopyTextureCHROMIUMResourceManager(); 50 ~CopyTextureCHROMIUMResourceManager();
51 51
52 void Initialize(const gles2::GLES2Decoder* decoder, 52 void Initialize(const gles2::GLES2Decoder* decoder,
53 const gles2::FeatureInfo::FeatureFlags& feature_flags); 53 const gles2::FeatureInfo::FeatureFlags& feature_flags);
54 void Destroy(); 54 void Destroy();
55 55
56 void DoCopyTexture(const gles2::GLES2Decoder* decoder, 56 void DoCopyTexture(const gles2::GLES2Decoder* decoder,
57 GLenum source_target, 57 GLenum source_target,
58 GLuint source_id, 58 GLuint source_id,
59 GLint source_level,
59 GLenum source_internal_format, 60 GLenum source_internal_format,
60 GLenum dest_target, 61 GLenum dest_target,
61 GLuint dest_id, 62 GLuint dest_id,
63 GLint dest_level,
62 GLenum dest_internal_format, 64 GLenum dest_internal_format,
63 GLsizei width, 65 GLsizei width,
64 GLsizei height, 66 GLsizei height,
65 bool flip_y, 67 bool flip_y,
66 bool premultiply_alpha, 68 bool premultiply_alpha,
67 bool unpremultiply_alpha, 69 bool unpremultiply_alpha,
68 CopyTextureMethod method); 70 CopyTextureMethod method);
69 71
70 void DoCopySubTexture(const gles2::GLES2Decoder* decoder, 72 void DoCopySubTexture(const gles2::GLES2Decoder* decoder,
71 GLenum source_target, 73 GLenum source_target,
72 GLuint source_id, 74 GLuint source_id,
75 GLint source_level,
73 GLenum source_internal_format, 76 GLenum source_internal_format,
74 GLenum dest_target, 77 GLenum dest_target,
75 GLuint dest_id, 78 GLuint dest_id,
79 GLint dest_level,
76 GLenum dest_internal_format, 80 GLenum dest_internal_format,
77 GLint xoffset, 81 GLint xoffset,
78 GLint yoffset, 82 GLint yoffset,
79 GLint x, 83 GLint x,
80 GLint y, 84 GLint y,
81 GLsizei width, 85 GLsizei width,
82 GLsizei height, 86 GLsizei height,
83 GLsizei dest_width, 87 GLsizei dest_width,
84 GLsizei dest_height, 88 GLsizei dest_height,
85 GLsizei source_width, 89 GLsizei source_width,
86 GLsizei source_height, 90 GLsizei source_height,
87 bool flip_y, 91 bool flip_y,
88 bool premultiply_alpha, 92 bool premultiply_alpha,
89 bool unpremultiply_alpha, 93 bool unpremultiply_alpha,
90 CopyTextureMethod method); 94 CopyTextureMethod method);
91 95
92 void DoCopySubTextureWithTransform(const gles2::GLES2Decoder* decoder, 96 void DoCopySubTextureWithTransform(const gles2::GLES2Decoder* decoder,
93 GLenum source_target, 97 GLenum source_target,
94 GLuint source_id, 98 GLuint source_id,
99 GLint source_level,
95 GLenum source_internal_format, 100 GLenum source_internal_format,
96 GLenum dest_target, 101 GLenum dest_target,
97 GLuint dest_id, 102 GLuint dest_id,
103 GLint dest_level,
98 GLenum dest_internal_format, 104 GLenum dest_internal_format,
99 GLint xoffset, 105 GLint xoffset,
100 GLint yoffset, 106 GLint yoffset,
101 GLint x, 107 GLint x,
102 GLint y, 108 GLint y,
103 GLsizei width, 109 GLsizei width,
104 GLsizei height, 110 GLsizei height,
105 GLsizei dest_width, 111 GLsizei dest_width,
106 GLsizei dest_height, 112 GLsizei dest_height,
107 GLsizei source_width, 113 GLsizei source_width,
108 GLsizei source_height, 114 GLsizei source_height,
109 bool flip_y, 115 bool flip_y,
110 bool premultiply_alpha, 116 bool premultiply_alpha,
111 bool unpremultiply_alpha, 117 bool unpremultiply_alpha,
112 const GLfloat transform_matrix[16]); 118 const GLfloat transform_matrix[16]);
113 119
114 // This will apply a transform on the texture coordinates before sampling 120 // This will apply a transform on the texture coordinates before sampling
115 // the source texture and copying to the destination texture. The transform 121 // the source texture and copying to the destination texture. The transform
116 // matrix should be given in column-major form, so it can be passed 122 // matrix should be given in column-major form, so it can be passed
117 // directly to GL. 123 // directly to GL.
118 void DoCopyTextureWithTransform(const gles2::GLES2Decoder* decoder, 124 void DoCopyTextureWithTransform(const gles2::GLES2Decoder* decoder,
119 GLenum source_target, 125 GLenum source_target,
120 GLuint source_id, 126 GLuint source_id,
127 GLint source_level,
121 GLenum source_format, 128 GLenum source_format,
122 GLenum dest_target, 129 GLenum dest_target,
123 GLuint dest_id, 130 GLuint dest_id,
131 GLint dest_level,
124 GLenum dest_format, 132 GLenum dest_format,
125 GLsizei width, 133 GLsizei width,
126 GLsizei height, 134 GLsizei height,
127 bool flip_y, 135 bool flip_y,
128 bool premultiply_alpha, 136 bool premultiply_alpha,
129 bool unpremultiply_alpha, 137 bool unpremultiply_alpha,
130 const GLfloat transform_matrix[16]); 138 const GLfloat transform_matrix[16]);
131 139
132 // The attributes used during invocation of the extension. 140 // The attributes used during invocation of the extension.
133 static const GLuint kVertexPositionAttrib = 0; 141 static const GLuint kVertexPositionAttrib = 0;
(...skipping 21 matching lines...) Expand all
155 GLuint vertex_source_mult_handle; 163 GLuint vertex_source_mult_handle;
156 GLuint vertex_source_add_handle; 164 GLuint vertex_source_add_handle;
157 165
158 GLuint tex_coord_transform_handle; 166 GLuint tex_coord_transform_handle;
159 GLuint sampler_handle; 167 GLuint sampler_handle;
160 }; 168 };
161 169
162 void DoCopyTextureInternal(const gles2::GLES2Decoder* decoder, 170 void DoCopyTextureInternal(const gles2::GLES2Decoder* decoder,
163 GLenum source_target, 171 GLenum source_target,
164 GLuint source_id, 172 GLuint source_id,
173 GLint source_level,
165 GLenum source_format, 174 GLenum source_format,
166 GLenum dest_target, 175 GLenum dest_target,
167 GLuint dest_id, 176 GLuint dest_id,
177 GLint dest_level,
168 GLenum dest_format, 178 GLenum dest_format,
169 GLint xoffset, 179 GLint xoffset,
170 GLint yoffset, 180 GLint yoffset,
171 GLint x, 181 GLint x,
172 GLint y, 182 GLint y,
173 GLsizei width, 183 GLsizei width,
174 GLsizei height, 184 GLsizei height,
175 GLsizei dest_width, 185 GLsizei dest_width,
176 GLsizei dest_height, 186 GLsizei dest_height,
177 GLsizei source_width, 187 GLsizei source_width,
(...skipping 15 matching lines...) Expand all
193 GLuint buffer_id_; 203 GLuint buffer_id_;
194 GLuint framebuffer_; 204 GLuint framebuffer_;
195 205
196 DISALLOW_COPY_AND_ASSIGN(CopyTextureCHROMIUMResourceManager); 206 DISALLOW_COPY_AND_ASSIGN(CopyTextureCHROMIUMResourceManager);
197 }; 207 };
198 208
199 } // namespace gles2 209 } // namespace gles2
200 } // namespace gpu 210 } // namespace gpu
201 211
202 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_COPY_TEXTURE_CHROMIUM_H_ 212 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_COPY_TEXTURE_CHROMIUM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698