OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_PROGRAM_MANAGER_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_ |
6 #define GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 21 matching lines...) Expand all Loading... |
32 public: | 32 public: |
33 typedef scoped_refptr<ProgramInfo> Ref; | 33 typedef scoped_refptr<ProgramInfo> Ref; |
34 | 34 |
35 static const int kMaxAttachedShaders = 2; | 35 static const int kMaxAttachedShaders = 2; |
36 | 36 |
37 struct UniformInfo { | 37 struct UniformInfo { |
38 UniformInfo(GLsizei _size, GLenum _type, const std::string& _name); | 38 UniformInfo(GLsizei _size, GLenum _type, const std::string& _name); |
39 ~UniformInfo(); | 39 ~UniformInfo(); |
40 | 40 |
41 bool IsSampler() const { | 41 bool IsSampler() const { |
42 return type == GL_SAMPLER_2D || type == GL_SAMPLER_CUBE; | 42 return type == GL_SAMPLER_2D || type == GL_SAMPLER_CUBE || |
| 43 type == GL_SAMPLER_EXTERNAL_OES; |
43 } | 44 } |
44 | 45 |
45 GLsizei size; | 46 GLsizei size; |
46 GLenum type; | 47 GLenum type; |
47 bool is_array; | 48 bool is_array; |
48 std::string name; | 49 std::string name; |
49 std::vector<GLint> element_locations; | 50 std::vector<GLint> element_locations; |
50 std::vector<GLuint> texture_units; | 51 std::vector<GLuint> texture_units; |
51 }; | 52 }; |
52 struct VertexAttribInfo { | 53 struct VertexAttribInfo { |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 void RemoveProgramInfoIfUnused( | 286 void RemoveProgramInfoIfUnused( |
286 ShaderManager* shader_manager, ProgramInfo* info); | 287 ShaderManager* shader_manager, ProgramInfo* info); |
287 | 288 |
288 DISALLOW_COPY_AND_ASSIGN(ProgramManager); | 289 DISALLOW_COPY_AND_ASSIGN(ProgramManager); |
289 }; | 290 }; |
290 | 291 |
291 } // namespace gles2 | 292 } // namespace gles2 |
292 } // namespace gpu | 293 } // namespace gpu |
293 | 294 |
294 #endif // GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_ | 295 #endif // GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_ |
OLD | NEW |