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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 bool unpremultiply_alpha); | 43 bool unpremultiply_alpha); |
44 | 44 |
45 void DoCopySubTexture(const gles2::GLES2Decoder* decoder, | 45 void DoCopySubTexture(const gles2::GLES2Decoder* decoder, |
46 GLenum source_target, | 46 GLenum source_target, |
47 GLuint source_id, | 47 GLuint source_id, |
48 GLenum source_internal_format, | 48 GLenum source_internal_format, |
49 GLuint dest_id, | 49 GLuint dest_id, |
50 GLenum dest_internal_format, | 50 GLenum dest_internal_format, |
51 GLint xoffset, | 51 GLint xoffset, |
52 GLint yoffset, | 52 GLint yoffset, |
| 53 GLint x, |
| 54 GLint y, |
| 55 GLsizei width, |
| 56 GLsizei height, |
53 GLsizei dest_width, | 57 GLsizei dest_width, |
54 GLsizei dest_height, | 58 GLsizei dest_height, |
55 GLsizei source_width, | 59 GLsizei source_width, |
56 GLsizei source_height, | 60 GLsizei source_height, |
57 bool flip_y, | 61 bool flip_y, |
58 bool premultiply_alpha, | 62 bool premultiply_alpha, |
59 bool unpremultiply_alpha); | 63 bool unpremultiply_alpha); |
60 | 64 |
61 // This will apply a transform on the source texture before copying to | 65 // This will apply a transform on the source texture before copying to |
62 // destination texture. | 66 // destination texture. |
63 void DoCopyTextureWithTransform(const gles2::GLES2Decoder* decoder, | 67 void DoCopyTextureWithTransform(const gles2::GLES2Decoder* decoder, |
64 GLenum source_target, | 68 GLenum source_target, |
65 GLuint source_id, | 69 GLuint source_id, |
66 GLuint dest_id, | 70 GLuint dest_id, |
67 GLsizei width, | 71 GLsizei width, |
68 GLsizei height, | 72 GLsizei height, |
69 bool flip_y, | 73 bool flip_y, |
70 bool premultiply_alpha, | 74 bool premultiply_alpha, |
71 bool unpremultiply_alpha, | 75 bool unpremultiply_alpha, |
72 const GLfloat transform_matrix[16]); | 76 const GLfloat transform_matrix[16]); |
73 | 77 |
74 void DoCopySubTextureWithTransform(const gles2::GLES2Decoder* decoder, | |
75 GLenum source_target, | |
76 GLuint source_id, | |
77 GLuint dest_id, | |
78 GLint xoffset, | |
79 GLint yoffset, | |
80 GLsizei dest_width, | |
81 GLsizei dest_height, | |
82 GLsizei source_width, | |
83 GLsizei source_height, | |
84 bool flip_y, | |
85 bool premultiply_alpha, | |
86 bool unpremultiply_alpha, | |
87 const GLfloat transform_matrix[16]); | |
88 | |
89 // The attributes used during invocation of the extension. | 78 // The attributes used during invocation of the extension. |
90 static const GLuint kVertexPositionAttrib = 0; | 79 static const GLuint kVertexPositionAttrib = 0; |
91 | 80 |
92 private: | 81 private: |
93 struct ProgramInfo { | 82 struct ProgramInfo { |
94 ProgramInfo() | 83 ProgramInfo() |
95 : program(0u), | 84 : program(0u), |
96 matrix_handle(0u), | 85 matrix_handle(0u), |
97 half_size_handle(0u), | 86 half_size_handle(0u), |
98 sampler_handle(0u) {} | 87 sampler_handle(0u) {} |
(...skipping 10 matching lines...) Expand all Loading... |
109 GLuint dest_id, | 98 GLuint dest_id, |
110 GLint xoffset, | 99 GLint xoffset, |
111 GLint yoffset, | 100 GLint yoffset, |
112 GLsizei dest_width, | 101 GLsizei dest_width, |
113 GLsizei dest_height, | 102 GLsizei dest_height, |
114 GLsizei source_width, | 103 GLsizei source_width, |
115 GLsizei source_height, | 104 GLsizei source_height, |
116 bool flip_y, | 105 bool flip_y, |
117 bool premultiply_alpha, | 106 bool premultiply_alpha, |
118 bool unpremultiply_alpha, | 107 bool unpremultiply_alpha, |
119 const GLfloat transform_matrix[16]); | 108 const GLfloat transform_matrix[16], |
| 109 GLint scissor_x, |
| 110 GLint scissor_y, |
| 111 GLsizei scissor_width, |
| 112 GLsizei scissor_height); |
120 | 113 |
121 bool initialized_; | 114 bool initialized_; |
122 typedef std::vector<GLuint> ShaderVector; | 115 typedef std::vector<GLuint> ShaderVector; |
123 ShaderVector vertex_shaders_; | 116 ShaderVector vertex_shaders_; |
124 ShaderVector fragment_shaders_; | 117 ShaderVector fragment_shaders_; |
125 typedef std::pair<int, int> ProgramMapKey; | 118 typedef std::pair<int, int> ProgramMapKey; |
126 typedef base::hash_map<ProgramMapKey, ProgramInfo> ProgramMap; | 119 typedef base::hash_map<ProgramMapKey, ProgramInfo> ProgramMap; |
127 ProgramMap programs_; | 120 ProgramMap programs_; |
128 GLuint buffer_id_; | 121 GLuint buffer_id_; |
129 GLuint framebuffer_; | 122 GLuint framebuffer_; |
130 | 123 |
131 DISALLOW_COPY_AND_ASSIGN(CopyTextureCHROMIUMResourceManager); | 124 DISALLOW_COPY_AND_ASSIGN(CopyTextureCHROMIUMResourceManager); |
132 }; | 125 }; |
133 | 126 |
134 } // namespace gpu. | 127 } // namespace gpu. |
135 | 128 |
136 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_COPY_TEXTURE_CHROMIUM_H_ | 129 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_COPY_TEXTURE_CHROMIUM_H_ |
OLD | NEW |