OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "gpu/command_buffer/service/vertex_attrib_manager.h" | 5 #include "gpu/command_buffer/service/vertex_attrib_manager.h" |
6 | 6 |
7 #include <list> | 7 #include <list> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 return false; | 81 return false; |
82 } | 82 } |
83 VertexAttribInfo& info = vertex_attrib_infos_[index]; | 83 VertexAttribInfo& info = vertex_attrib_infos_[index]; |
84 if (info.enabled() != enable) { | 84 if (info.enabled() != enable) { |
85 info.set_enabled(enable); | 85 info.set_enabled(enable); |
86 info.SetList(enable ? &enabled_vertex_attribs_ : &disabled_vertex_attribs_); | 86 info.SetList(enable ? &enabled_vertex_attribs_ : &disabled_vertex_attribs_); |
87 } | 87 } |
88 return true; | 88 return true; |
89 } | 89 } |
90 | 90 |
| 91 void VertexAttribManager::Unbind(BufferManager::BufferInfo* buffer) { |
| 92 for (uint32 vv = 0; vv < max_vertex_attribs_; ++vv) { |
| 93 vertex_attrib_infos_[vv].Unbind(buffer); |
| 94 } |
| 95 } |
91 | 96 |
92 } // namespace gles2 | 97 } // namespace gles2 |
93 } // namespace gpu | 98 } // namespace gpu |
OLD | NEW |