| OLD | NEW |
| 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 16 matching lines...) Expand all Loading... |
| 27 CopyTextureCHROMIUMResourceManager(); | 27 CopyTextureCHROMIUMResourceManager(); |
| 28 ~CopyTextureCHROMIUMResourceManager(); | 28 ~CopyTextureCHROMIUMResourceManager(); |
| 29 | 29 |
| 30 void Initialize(const gles2::GLES2Decoder* decoder); | 30 void Initialize(const gles2::GLES2Decoder* decoder); |
| 31 void Destroy(); | 31 void Destroy(); |
| 32 | 32 |
| 33 void DoCopyTexture(const gles2::GLES2Decoder* decoder, | 33 void DoCopyTexture(const gles2::GLES2Decoder* decoder, |
| 34 GLenum source_target, | 34 GLenum source_target, |
| 35 GLuint source_id, | 35 GLuint source_id, |
| 36 GLenum source_internal_format, | 36 GLenum source_internal_format, |
| 37 GLenum dest_target, |
| 37 GLuint dest_id, | 38 GLuint dest_id, |
| 38 GLenum dest_internal_format, | 39 GLenum dest_internal_format, |
| 39 GLsizei width, | 40 GLsizei width, |
| 40 GLsizei height, | 41 GLsizei height, |
| 41 bool flip_y, | 42 bool flip_y, |
| 42 bool premultiply_alpha, | 43 bool premultiply_alpha, |
| 43 bool unpremultiply_alpha); | 44 bool unpremultiply_alpha); |
| 44 | 45 |
| 45 void DoCopySubTexture(const gles2::GLES2Decoder* decoder, | 46 void DoCopySubTexture(const gles2::GLES2Decoder* decoder, |
| 46 GLenum source_target, | 47 GLenum source_target, |
| 47 GLuint source_id, | 48 GLuint source_id, |
| 48 GLenum source_internal_format, | 49 GLenum source_internal_format, |
| 50 GLenum dest_target, |
| 49 GLuint dest_id, | 51 GLuint dest_id, |
| 50 GLenum dest_internal_format, | 52 GLenum dest_internal_format, |
| 51 GLint xoffset, | 53 GLint xoffset, |
| 52 GLint yoffset, | 54 GLint yoffset, |
| 53 GLint x, | 55 GLint x, |
| 54 GLint y, | 56 GLint y, |
| 55 GLsizei width, | 57 GLsizei width, |
| 56 GLsizei height, | 58 GLsizei height, |
| 57 GLsizei dest_width, | 59 GLsizei dest_width, |
| 58 GLsizei dest_height, | 60 GLsizei dest_height, |
| 59 GLsizei source_width, | 61 GLsizei source_width, |
| 60 GLsizei source_height, | 62 GLsizei source_height, |
| 61 bool flip_y, | 63 bool flip_y, |
| 62 bool premultiply_alpha, | 64 bool premultiply_alpha, |
| 63 bool unpremultiply_alpha); | 65 bool unpremultiply_alpha); |
| 64 | 66 |
| 65 // This will apply a transform on the texture coordinates before sampling | 67 // This will apply a transform on the texture coordinates before sampling |
| 66 // the source texture and copying to the destination texture. The transform | 68 // the source texture and copying to the destination texture. The transform |
| 67 // matrix should be given in column-major form, so it can be passed | 69 // matrix should be given in column-major form, so it can be passed |
| 68 // directly to GL. | 70 // directly to GL. |
| 69 void DoCopyTextureWithTransform(const gles2::GLES2Decoder* decoder, | 71 void DoCopyTextureWithTransform(const gles2::GLES2Decoder* decoder, |
| 70 GLenum source_target, | 72 GLenum source_target, |
| 71 GLuint source_id, | 73 GLuint source_id, |
| 74 GLenum dest_target, |
| 72 GLuint dest_id, | 75 GLuint dest_id, |
| 73 GLsizei width, | 76 GLsizei width, |
| 74 GLsizei height, | 77 GLsizei height, |
| 75 bool flip_y, | 78 bool flip_y, |
| 76 bool premultiply_alpha, | 79 bool premultiply_alpha, |
| 77 bool unpremultiply_alpha, | 80 bool unpremultiply_alpha, |
| 78 const GLfloat transform_matrix[16]); | 81 const GLfloat transform_matrix[16]); |
| 79 | 82 |
| 80 // The attributes used during invocation of the extension. | 83 // The attributes used during invocation of the extension. |
| 81 static const GLuint kVertexPositionAttrib = 0; | 84 static const GLuint kVertexPositionAttrib = 0; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 92 GLuint program; | 95 GLuint program; |
| 93 GLuint vertex_translate_handle; | 96 GLuint vertex_translate_handle; |
| 94 GLuint tex_coord_transform_handle; | 97 GLuint tex_coord_transform_handle; |
| 95 GLuint half_size_handle; | 98 GLuint half_size_handle; |
| 96 GLuint sampler_handle; | 99 GLuint sampler_handle; |
| 97 }; | 100 }; |
| 98 | 101 |
| 99 void DoCopyTextureInternal(const gles2::GLES2Decoder* decoder, | 102 void DoCopyTextureInternal(const gles2::GLES2Decoder* decoder, |
| 100 GLenum source_target, | 103 GLenum source_target, |
| 101 GLuint source_id, | 104 GLuint source_id, |
| 105 GLenum dest_target, |
| 102 GLuint dest_id, | 106 GLuint dest_id, |
| 103 GLint xoffset, | 107 GLint xoffset, |
| 104 GLint yoffset, | 108 GLint yoffset, |
| 105 GLint x, | 109 GLint x, |
| 106 GLint y, | 110 GLint y, |
| 107 GLsizei width, | 111 GLsizei width, |
| 108 GLsizei height, | 112 GLsizei height, |
| 109 GLsizei dest_width, | 113 GLsizei dest_width, |
| 110 GLsizei dest_height, | 114 GLsizei dest_height, |
| 111 GLsizei source_width, | 115 GLsizei source_width, |
| (...skipping 12 matching lines...) Expand all Loading... |
| 124 ProgramMap programs_; | 128 ProgramMap programs_; |
| 125 GLuint buffer_id_; | 129 GLuint buffer_id_; |
| 126 GLuint framebuffer_; | 130 GLuint framebuffer_; |
| 127 | 131 |
| 128 DISALLOW_COPY_AND_ASSIGN(CopyTextureCHROMIUMResourceManager); | 132 DISALLOW_COPY_AND_ASSIGN(CopyTextureCHROMIUMResourceManager); |
| 129 }; | 133 }; |
| 130 | 134 |
| 131 } // namespace gpu. | 135 } // namespace gpu. |
| 132 | 136 |
| 133 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_COPY_TEXTURE_CHROMIUM_H_ | 137 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_COPY_TEXTURE_CHROMIUM_H_ |
| OLD | NEW |