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_CLIENT_PROGRAM_INFO_MANAGER_H_ | 5 #ifndef GPU_COMMAND_BUFFER_CLIENT_PROGRAM_INFO_MANAGER_H_ |
6 #define GPU_COMMAND_BUFFER_CLIENT_PROGRAM_INFO_MANAGER_H_ | 6 #define GPU_COMMAND_BUFFER_CLIENT_PROGRAM_INFO_MANAGER_H_ |
7 | 7 |
8 #include <GLES3/gl3.h> | 8 #include <GLES3/gl3.h> |
| 9 #include <stdint.h> |
9 | 10 |
10 #include <string> | 11 #include <string> |
11 #include <vector> | 12 #include <vector> |
12 | 13 |
13 #include "base/containers/hash_tables.h" | 14 #include "base/containers/hash_tables.h" |
14 #include "base/gtest_prod_util.h" | 15 #include "base/gtest_prod_util.h" |
15 #include "base/synchronization/lock.h" | 16 #include "base/synchronization/lock.h" |
16 #include "gles2_impl_export.h" | 17 #include "gles2_impl_export.h" |
17 #include "gpu/command_buffer/client/gles2_implementation.h" | 18 #include "gpu/command_buffer/client/gles2_implementation.h" |
18 | 19 |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 // Gets the index of a uniform block by name. | 182 // Gets the index of a uniform block by name. |
182 GLuint GetUniformBlockIndex(const std::string& name) const; | 183 GLuint GetUniformBlockIndex(const std::string& name) const; |
183 const UniformBlock* GetUniformBlock(GLuint index) const; | 184 const UniformBlock* GetUniformBlock(GLuint index) const; |
184 // Update the binding if the |index| uniform block is in the cache. | 185 // Update the binding if the |index| uniform block is in the cache. |
185 void UniformBlockBinding(GLuint index, GLuint binding); | 186 void UniformBlockBinding(GLuint index, GLuint binding); |
186 | 187 |
187 const TransformFeedbackVarying* GetTransformFeedbackVarying( | 188 const TransformFeedbackVarying* GetTransformFeedbackVarying( |
188 GLuint index) const; | 189 GLuint index) const; |
189 | 190 |
190 // Updates the ES2 only program info after a successful link. | 191 // Updates the ES2 only program info after a successful link. |
191 void UpdateES2(const std::vector<int8>& result); | 192 void UpdateES2(const std::vector<int8_t>& result); |
192 | 193 |
193 // Updates the ES3 UniformBlock info after a successful link. | 194 // Updates the ES3 UniformBlock info after a successful link. |
194 void UpdateES3UniformBlocks(const std::vector<int8>& result); | 195 void UpdateES3UniformBlocks(const std::vector<int8_t>& result); |
195 | 196 |
196 // Updates the ES3 Uniformsiv info after a successful link. | 197 // Updates the ES3 Uniformsiv info after a successful link. |
197 void UpdateES3Uniformsiv(const std::vector<int8>& result); | 198 void UpdateES3Uniformsiv(const std::vector<int8_t>& result); |
198 | 199 |
199 // Updates the ES3 TransformFeedbackVaryings info after a successful link. | 200 // Updates the ES3 TransformFeedbackVaryings info after a successful link. |
200 void UpdateES3TransformFeedbackVaryings(const std::vector<int8>& result); | 201 void UpdateES3TransformFeedbackVaryings(const std::vector<int8_t>& result); |
201 | 202 |
202 bool IsCached(ProgramInfoType type) const; | 203 bool IsCached(ProgramInfoType type) const; |
203 | 204 |
204 private: | 205 private: |
205 bool cached_es2_; | 206 bool cached_es2_; |
206 | 207 |
207 GLsizei max_attrib_name_length_; | 208 GLsizei max_attrib_name_length_; |
208 | 209 |
209 // Attrib by index. | 210 // Attrib by index. |
210 std::vector<VertexAttrib> attrib_infos_; | 211 std::vector<VertexAttrib> attrib_infos_; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 | 250 |
250 ProgramInfoMap program_infos_; | 251 ProgramInfoMap program_infos_; |
251 | 252 |
252 mutable base::Lock lock_; | 253 mutable base::Lock lock_; |
253 }; | 254 }; |
254 | 255 |
255 } // namespace gles2 | 256 } // namespace gles2 |
256 } // namespace gpu | 257 } // namespace gpu |
257 | 258 |
258 #endif // GPU_COMMAND_BUFFER_CLIENT_PROGRAM_INFO_MANAGER_H_ | 259 #endif // GPU_COMMAND_BUFFER_CLIENT_PROGRAM_INFO_MANAGER_H_ |
OLD | NEW |