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

Unified Diff: gpu/command_buffer/service/vertex_array_manager.cc

Issue 278653002: Reland r264914 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 months 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_array_manager.cc
diff --git a/gpu/command_buffer/service/vertex_array_manager.cc b/gpu/command_buffer/service/vertex_array_manager.cc
index 974751941ce4a41fdbcc5efe596560db1995bed5..1560c043c25e9964db98709cf9a425baf73db600 100644
--- a/gpu/command_buffer/service/vertex_array_manager.cc
+++ b/gpu/command_buffer/service/vertex_array_manager.cc
@@ -28,14 +28,22 @@ void VertexArrayManager::Destroy(bool have_context) {
vertex_attrib_managers_.clear();
}
-void VertexArrayManager::CreateVertexAttribManager(
- GLuint client_id, GLuint service_id, uint32 num_vertex_attribs) {
+scoped_refptr<VertexAttribManager>
+VertexArrayManager::CreateVertexAttribManager(GLuint client_id,
+ GLuint service_id,
+ uint32 num_vertex_attribs,
+ bool client_visible) {
scoped_refptr<VertexAttribManager> vertex_attrib_manager(
new VertexAttribManager(this, service_id, num_vertex_attribs));
- std::pair<VertexAttribManagerMap::iterator, bool> result =
- vertex_attrib_managers_.insert(
- std::make_pair(client_id, vertex_attrib_manager));
- DCHECK(result.second);
+
+ if (client_visible) {
+ std::pair<VertexAttribManagerMap::iterator, bool> result =
+ vertex_attrib_managers_.insert(
+ std::make_pair(client_id, vertex_attrib_manager));
+ DCHECK(result.second);
+ }
+
+ return vertex_attrib_manager;
}
VertexAttribManager* VertexArrayManager::GetVertexAttribManager(
« no previous file with comments | « gpu/command_buffer/service/vertex_array_manager.h ('k') | gpu/command_buffer/service/vertex_array_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698