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 GLsizei width, GLsizei height, bool flip_y, | 43 GLsizei width, GLsizei height, bool flip_y, |
44 bool premultiply_alpha, | 44 bool premultiply_alpha, |
45 bool unpremultiply_alpha, | 45 bool unpremultiply_alpha, |
46 const GLfloat transform_matrix[16]); | 46 const GLfloat transform_matrix[16]); |
47 | 47 |
48 // The attributes used during invocation of the extension. | 48 // The attributes used during invocation of the extension. |
49 static const GLuint kVertexPositionAttrib = 0; | 49 static const GLuint kVertexPositionAttrib = 0; |
50 | 50 |
51 private: | 51 private: |
52 struct ProgramInfo { | 52 struct ProgramInfo { |
53 ProgramInfo() : program(0u), matrix_handle(0u), sampler_handle(0u) {} | 53 ProgramInfo() |
| 54 : program(0u), |
| 55 matrix_handle(0u), |
| 56 half_size_handle(0u), |
| 57 sampler_handle(0u) {} |
54 | 58 |
55 GLuint program; | 59 GLuint program; |
56 GLuint matrix_handle; | 60 GLuint matrix_handle; |
| 61 GLuint half_size_handle; |
57 GLuint sampler_handle; | 62 GLuint sampler_handle; |
58 }; | 63 }; |
59 | 64 |
60 bool initialized_; | 65 bool initialized_; |
61 typedef std::vector<GLuint> ShaderVector; | 66 typedef std::vector<GLuint> ShaderVector; |
62 ShaderVector vertex_shaders_; | 67 ShaderVector vertex_shaders_; |
63 ShaderVector fragment_shaders_; | 68 ShaderVector fragment_shaders_; |
64 typedef std::pair<int, int> ProgramMapKey; | 69 typedef std::pair<int, int> ProgramMapKey; |
65 typedef base::hash_map<ProgramMapKey, ProgramInfo> ProgramMap; | 70 typedef base::hash_map<ProgramMapKey, ProgramInfo> ProgramMap; |
66 ProgramMap programs_; | 71 ProgramMap programs_; |
67 GLuint buffer_id_; | 72 GLuint buffer_id_; |
68 GLuint framebuffer_; | 73 GLuint framebuffer_; |
69 | 74 |
70 DISALLOW_COPY_AND_ASSIGN(CopyTextureCHROMIUMResourceManager); | 75 DISALLOW_COPY_AND_ASSIGN(CopyTextureCHROMIUMResourceManager); |
71 }; | 76 }; |
72 | 77 |
73 } // namespace gpu. | 78 } // namespace gpu. |
74 | 79 |
75 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_COPY_TEXTURE_CHROMIUM_H_ | 80 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_COPY_TEXTURE_CHROMIUM_H_ |
OLD | NEW |