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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/containers/hash_tables.h" | 9 #include "base/containers/hash_tables.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 // This class keeps track of the vertex arrays and their sizes so we can do | 21 // This class keeps track of the vertex arrays and their sizes so we can do |
22 // bounds checking. | 22 // bounds checking. |
23 class GPU_EXPORT VertexArrayManager { | 23 class GPU_EXPORT VertexArrayManager { |
24 public: | 24 public: |
25 VertexArrayManager(); | 25 VertexArrayManager(); |
26 ~VertexArrayManager(); | 26 ~VertexArrayManager(); |
27 | 27 |
28 // Must call before destruction. | 28 // Must call before destruction. |
29 void Destroy(bool have_context); | 29 void Destroy(bool have_context); |
30 | 30 |
31 // Creates a VertexAttribManager and if client_visible, | 31 // Creates a VertexArrayInfo for the given vertex array. |
32 // maps it to the client_id. | 32 void CreateVertexAttribManager(GLuint client_id, GLuint service_id, |
33 scoped_refptr<VertexAttribManager> CreateVertexAttribManager( | 33 uint32 num_vertex_attribs); |
34 GLuint client_id, | |
35 GLuint service_id, | |
36 uint32 num_vertex_attribs, | |
37 bool client_visible); | |
38 | 34 |
39 // Gets the vertex attrib manager for the given vertex array. | 35 // Gets the vertex attrib manager for the given vertex array. |
40 VertexAttribManager* GetVertexAttribManager(GLuint client_id); | 36 VertexAttribManager* GetVertexAttribManager(GLuint client_id); |
41 | 37 |
42 // Removes the vertex attrib manager for the given vertex array. | 38 // Removes the vertex attrib manager for the given vertex array. |
43 void RemoveVertexAttribManager(GLuint client_id); | 39 void RemoveVertexAttribManager(GLuint client_id); |
44 | 40 |
45 // Gets a client id for a given service id. | 41 // Gets a client id for a given service id. |
46 bool GetClientId(GLuint service_id, GLuint* client_id) const; | 42 bool GetClientId(GLuint service_id, GLuint* client_id) const; |
47 | 43 |
(...skipping 14 matching lines...) Expand all Loading... |
62 | 58 |
63 bool have_context_; | 59 bool have_context_; |
64 | 60 |
65 DISALLOW_COPY_AND_ASSIGN(VertexArrayManager); | 61 DISALLOW_COPY_AND_ASSIGN(VertexArrayManager); |
66 }; | 62 }; |
67 | 63 |
68 } // namespace gles2 | 64 } // namespace gles2 |
69 } // namespace gpu | 65 } // namespace gpu |
70 | 66 |
71 #endif // GPU_COMMAND_BUFFER_SERVICE_VERTEX_ARRAY_MANAGER_H_ | 67 #endif // GPU_COMMAND_BUFFER_SERVICE_VERTEX_ARRAY_MANAGER_H_ |
OLD | NEW |