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

Unified Diff: gpu/command_buffer/service/vertex_attrib_manager.h

Issue 11275120: Virtual GL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/service/vertex_attrib_manager.h
diff --git a/gpu/command_buffer/service/vertex_attrib_manager.h b/gpu/command_buffer/service/vertex_attrib_manager.h
index 95f58b1a1699eb756cab13267b4d08543329e0c1..28e5bd29fecfcf305e70c6eda0925098008a4fc0 100644
--- a/gpu/command_buffer/service/vertex_attrib_manager.h
+++ b/gpu/command_buffer/service/vertex_attrib_manager.h
@@ -6,6 +6,7 @@
#define GPU_COMMAND_BUFFER_SERVICE_VERTEX_ATTRIB_MANAGER_H_
#include <list>
+#include <vector>
#include "base/logging.h"
#include "base/memory/ref_counted.h"
#include "build/build_config.h"
@@ -200,7 +201,7 @@ class GPU_EXPORT VertexAttribManager :
}
VertexAttribInfo* GetVertexAttribInfo(GLuint index) {
- if (index < max_vertex_attribs_) {
+ if (index < vertex_attrib_infos_.size()) {
return &vertex_attrib_infos_[index];
}
return NULL;
@@ -257,6 +258,10 @@ class GPU_EXPORT VertexAttribManager :
return !IsDeleted();
}
+ size_t num_attribs() const {
+ return vertex_attrib_infos_.size();
+ }
+
private:
friend class VertexArrayManager;
friend class VertexArrayManagerTest;
@@ -272,14 +277,12 @@ class GPU_EXPORT VertexAttribManager :
deleted_ = true;
}
- uint32 max_vertex_attribs_;
-
// number of attribs using type GL_FIXED.
int num_fixed_attribs_;
// Info for each vertex attribute saved so we can check at glDrawXXX time
// if it is safe to draw.
- scoped_array<VertexAttribInfo> vertex_attrib_infos_;
+ std::vector<VertexAttribInfo> vertex_attrib_infos_;
// The currently bound element array buffer. If this is 0 it is illegal
// to call glDrawElements.
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_mock.h ('k') | gpu/command_buffer/service/vertex_attrib_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698