| 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_VERTEX_ARRAY_OBJECT_MANAGER_H_ | 5 #ifndef GPU_COMMAND_BUFFER_CLIENT_VERTEX_ARRAY_OBJECT_MANAGER_H_ |
| 6 #define GPU_COMMAND_BUFFER_CLIENT_VERTEX_ARRAY_OBJECT_MANAGER_H_ | 6 #define GPU_COMMAND_BUFFER_CLIENT_VERTEX_ARRAY_OBJECT_MANAGER_H_ |
| 7 | 7 |
| 8 #include <GLES2/gl2.h> | 8 #include <GLES2/gl2.h> |
| 9 | 9 |
| 10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "gles2_impl_export.h" | 13 #include "gles2_impl_export.h" |
| 14 | 14 |
| 15 namespace gpu { | 15 namespace gpu { |
| 16 namespace gles2 { | 16 namespace gles2 { |
| 17 | 17 |
| 18 class GLES2Implementation; | 18 class GLES2Implementation; |
| 19 class GLES2CmdHelper; | 19 class GLES2CmdHelper; |
| 20 class VertexArrayObject; | 20 class VertexArrayObject; |
| 21 | 21 |
| 22 // VertexArrayObjectManager manages vertex array objects on the client side | 22 // VertexArrayObjectManager manages vertex array objects on the client side |
| 23 // of the command buffer. | 23 // of the command buffer. |
| 24 class GLES2_IMPL_EXPORT VertexArrayObjectManager { | 24 class GLES2_IMPL_EXPORT VertexArrayObjectManager { |
| 25 public: | 25 public: |
| 26 VertexArrayObjectManager( | 26 VertexArrayObjectManager( |
| 27 GLuint max_vertex_attribs, | 27 GLuint max_vertex_attribs, |
| 28 GLuint array_buffer_id, | 28 GLuint array_buffer_id, |
| 29 GLuint element_array_buffer_id); | 29 GLuint element_array_buffer_id, |
| 30 bool support_client_side_arrays); |
| 30 ~VertexArrayObjectManager(); | 31 ~VertexArrayObjectManager(); |
| 31 | 32 |
| 32 bool IsReservedId(GLuint id) const; | 33 bool IsReservedId(GLuint id) const; |
| 33 | 34 |
| 34 // Binds an element array. | 35 // Binds an element array. |
| 35 // Returns true if service should be called. | 36 // Returns true if service should be called. |
| 36 bool BindElementArray(GLuint id); | 37 bool BindElementArray(GLuint id); |
| 37 | 38 |
| 38 // Unbind buffer. | 39 // Unbind buffer. |
| 39 void UnbindBuffer(GLuint id); | 40 void UnbindBuffer(GLuint id); |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 GLsizei array_buffer_offset_; | 110 GLsizei array_buffer_offset_; |
| 110 GLuint element_array_buffer_id_; | 111 GLuint element_array_buffer_id_; |
| 111 GLsizei element_array_buffer_size_; | 112 GLsizei element_array_buffer_size_; |
| 112 GLsizei collection_buffer_size_; | 113 GLsizei collection_buffer_size_; |
| 113 scoped_ptr<int8[]> collection_buffer_; | 114 scoped_ptr<int8[]> collection_buffer_; |
| 114 | 115 |
| 115 VertexArrayObject* default_vertex_array_object_; | 116 VertexArrayObject* default_vertex_array_object_; |
| 116 VertexArrayObject* bound_vertex_array_object_; | 117 VertexArrayObject* bound_vertex_array_object_; |
| 117 VertexArrayObjectMap vertex_array_objects_; | 118 VertexArrayObjectMap vertex_array_objects_; |
| 118 | 119 |
| 120 bool support_client_side_arrays_; |
| 121 |
| 119 DISALLOW_COPY_AND_ASSIGN(VertexArrayObjectManager); | 122 DISALLOW_COPY_AND_ASSIGN(VertexArrayObjectManager); |
| 120 }; | 123 }; |
| 121 | 124 |
| 122 } // namespace gles2 | 125 } // namespace gles2 |
| 123 } // namespace gpu | 126 } // namespace gpu |
| 124 | 127 |
| 125 #endif // GPU_COMMAND_BUFFER_CLIENT_VERTEX_ARRAY_OBJECT_MANAGER_H_ | 128 #endif // GPU_COMMAND_BUFFER_CLIENT_VERTEX_ARRAY_OBJECT_MANAGER_H_ |
| 126 | 129 |
| OLD | NEW |