| 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_VERTEX_ARRAY_MANAGER_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_VERTEX_ARRAY_MANAGER_H_ |
| 6 #define GPU_COMMAND_BUFFER_SERVICE_VERTEX_ARRAY_MANAGER_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_VERTEX_ARRAY_MANAGER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 | 49 |
| 50 private: | 50 private: |
| 51 friend class VertexAttribManager; | 51 friend class VertexAttribManager; |
| 52 | 52 |
| 53 void StartTracking(VertexAttribManager* vertex_attrib_manager); | 53 void StartTracking(VertexAttribManager* vertex_attrib_manager); |
| 54 void StopTracking(VertexAttribManager* vertex_attrib_manager); | 54 void StopTracking(VertexAttribManager* vertex_attrib_manager); |
| 55 | 55 |
| 56 // Info for each vertex array in the system. | 56 // Info for each vertex array in the system. |
| 57 typedef base::hash_map<GLuint, scoped_refptr<VertexAttribManager> > | 57 typedef base::hash_map<GLuint, scoped_refptr<VertexAttribManager> > |
| 58 VertexAttribManagerMap; | 58 VertexAttribManagerMap; |
| 59 VertexAttribManagerMap vertex_attrib_managers_; | 59 VertexAttribManagerMap client_vertex_attrib_managers_; |
| 60 |
| 61 // Vertex attrib managers for emulation purposes, not visible to clients. |
| 62 std::vector<scoped_refptr<VertexAttribManager>> other_vertex_attrib_managers_; |
| 60 | 63 |
| 61 // Counts the number of VertexArrayInfo allocated with 'this' as its manager. | 64 // Counts the number of VertexArrayInfo allocated with 'this' as its manager. |
| 62 // Allows to check no VertexArrayInfo will outlive this. | 65 // Allows to check no VertexArrayInfo will outlive this. |
| 63 unsigned int vertex_attrib_manager_count_; | 66 unsigned int vertex_attrib_manager_count_; |
| 64 | 67 |
| 65 bool have_context_; | 68 bool have_context_; |
| 66 | 69 |
| 67 DISALLOW_COPY_AND_ASSIGN(VertexArrayManager); | 70 DISALLOW_COPY_AND_ASSIGN(VertexArrayManager); |
| 68 }; | 71 }; |
| 69 | 72 |
| 70 } // namespace gles2 | 73 } // namespace gles2 |
| 71 } // namespace gpu | 74 } // namespace gpu |
| 72 | 75 |
| 73 #endif // GPU_COMMAND_BUFFER_SERVICE_VERTEX_ARRAY_MANAGER_H_ | 76 #endif // GPU_COMMAND_BUFFER_SERVICE_VERTEX_ARRAY_MANAGER_H_ |
| OLD | NEW |