| 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_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 24 matching lines...) Expand all Loading... |
| 35 | 35 |
| 36 static const int kMaxAttachedShaders = 2; | 36 static const int kMaxAttachedShaders = 2; |
| 37 | 37 |
| 38 struct UniformInfo { | 38 struct UniformInfo { |
| 39 UniformInfo( | 39 UniformInfo( |
| 40 GLsizei _size, GLenum _type, GLint _fake_location_base, | 40 GLsizei _size, GLenum _type, GLint _fake_location_base, |
| 41 const std::string& _name); | 41 const std::string& _name); |
| 42 ~UniformInfo(); | 42 ~UniformInfo(); |
| 43 | 43 |
| 44 bool IsSampler() const { | 44 bool IsSampler() const { |
| 45 return type == GL_SAMPLER_2D || type == GL_SAMPLER_CUBE || | 45 return type == GL_SAMPLER_2D || type == GL_SAMPLER_2D_RECT_ARB || |
| 46 type == GL_SAMPLER_EXTERNAL_OES; | 46 type == GL_SAMPLER_CUBE || type == GL_SAMPLER_EXTERNAL_OES; |
| 47 } | 47 } |
| 48 | 48 |
| 49 GLsizei size; | 49 GLsizei size; |
| 50 GLenum type; | 50 GLenum type; |
| 51 GLint fake_location_base; | 51 GLint fake_location_base; |
| 52 bool is_array; | 52 bool is_array; |
| 53 std::string name; | 53 std::string name; |
| 54 std::vector<GLint> element_locations; | 54 std::vector<GLint> element_locations; |
| 55 std::vector<GLuint> texture_units; | 55 std::vector<GLuint> texture_units; |
| 56 }; | 56 }; |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 void RemoveProgramInfoIfUnused( | 350 void RemoveProgramInfoIfUnused( |
| 351 ShaderManager* shader_manager, ProgramInfo* info); | 351 ShaderManager* shader_manager, ProgramInfo* info); |
| 352 | 352 |
| 353 DISALLOW_COPY_AND_ASSIGN(ProgramManager); | 353 DISALLOW_COPY_AND_ASSIGN(ProgramManager); |
| 354 }; | 354 }; |
| 355 | 355 |
| 356 } // namespace gles2 | 356 } // namespace gles2 |
| 357 } // namespace gpu | 357 } // namespace gpu |
| 358 | 358 |
| 359 #endif // GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_ | 359 #endif // GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_ |
| OLD | NEW |