Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Side by Side Diff: gpu/command_buffer/client/vertex_array_object_manager.h

Issue 702493002: PepperGL: Enable client side arrays support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation_unittest.cc ('k') | gpu/command_buffer/client/vertex_array_object_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698