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> |
| 9 |
8 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
9 #include "gpu/command_buffer/service/gl_utils.h" | 11 #include "gpu/command_buffer/service/gl_utils.h" |
10 #include "gpu/gpu_export.h" | 12 #include "gpu/gpu_export.h" |
11 | 13 |
12 namespace gpu { | 14 namespace gpu { |
13 namespace gles2 { | 15 namespace gles2 { |
14 | 16 |
15 class GLES2Decoder; | 17 class GLES2Decoder; |
16 | 18 |
17 } // namespace gles2. | 19 } // namespace gles2. |
(...skipping 23 matching lines...) Expand all Loading... |
41 GLsizei width, GLsizei height, bool flip_y, | 43 GLsizei width, GLsizei height, bool flip_y, |
42 bool premultiply_alpha, | 44 bool premultiply_alpha, |
43 bool unpremultiply_alpha, | 45 bool unpremultiply_alpha, |
44 const GLfloat transform_matrix[16]); | 46 const GLfloat transform_matrix[16]); |
45 | 47 |
46 // The attributes used during invocation of the extension. | 48 // The attributes used during invocation of the extension. |
47 static const GLuint kVertexPositionAttrib = 0; | 49 static const GLuint kVertexPositionAttrib = 0; |
48 | 50 |
49 private: | 51 private: |
50 struct ProgramInfo { | 52 struct ProgramInfo { |
51 ProgramInfo() : program(0u), matrix_handle(0u), sampler_locations(0u) {} | 53 ProgramInfo() : program(0u), matrix_handle(0u), sampler_handle(0u) {} |
52 | 54 |
53 GLuint program; | 55 GLuint program; |
54 GLuint matrix_handle; | 56 GLuint matrix_handle; |
55 GLuint sampler_locations; | 57 GLuint sampler_handle; |
56 }; | 58 }; |
57 | 59 |
58 bool initialized_; | 60 bool initialized_; |
| 61 typedef std::vector<GLuint> ShaderVector; |
| 62 ShaderVector vertex_shaders_; |
| 63 ShaderVector fragment_shaders_; |
59 typedef std::pair<int, int> ProgramMapKey; | 64 typedef std::pair<int, int> ProgramMapKey; |
60 typedef base::hash_map<ProgramMapKey, ProgramInfo> ProgramMap; | 65 typedef base::hash_map<ProgramMapKey, ProgramInfo> ProgramMap; |
61 ProgramMap programs_; | 66 ProgramMap programs_; |
62 GLuint buffer_id_; | 67 GLuint buffer_id_; |
63 GLuint framebuffer_; | 68 GLuint framebuffer_; |
64 GLuint vertex_shader_; | |
65 | 69 |
66 DISALLOW_COPY_AND_ASSIGN(CopyTextureCHROMIUMResourceManager); | 70 DISALLOW_COPY_AND_ASSIGN(CopyTextureCHROMIUMResourceManager); |
67 }; | 71 }; |
68 | 72 |
69 } // namespace gpu. | 73 } // namespace gpu. |
70 | 74 |
71 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_COPY_TEXTURE_CHROMIUM_H_ | 75 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_COPY_TEXTURE_CHROMIUM_H_ |
72 | |
73 | |
OLD | NEW |