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

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

Issue 11450026: Fix element array bug (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | gpu/command_buffer/client/vertex_array_object_manager_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "../client/vertex_array_object_manager.h" 5 #include "../client/vertex_array_object_manager.h"
6 6
7 #include "../client/gles2_cmd_helper.h" 7 #include "../client/gles2_cmd_helper.h"
8 #include "../client/gles2_implementation.h" 8 #include "../client/gles2_implementation.h"
9 #include "../common/logging.h" 9 #include "../common/logging.h"
10 10
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 void VertexArrayObject::UnbindBuffer(GLuint id) { 202 void VertexArrayObject::UnbindBuffer(GLuint id) {
203 for (size_t ii = 0; ii < vertex_attribs_.size(); ++ii) { 203 for (size_t ii = 0; ii < vertex_attribs_.size(); ++ii) {
204 VertexAttrib& attrib = vertex_attribs_[ii]; 204 VertexAttrib& attrib = vertex_attribs_[ii];
205 if (attrib.buffer_id() == id) { 205 if (attrib.buffer_id() == id) {
206 attrib.set_buffer_id(0); 206 attrib.set_buffer_id(0);
207 if (attrib.enabled()) { 207 if (attrib.enabled()) {
208 ++num_client_side_pointers_enabled_; 208 ++num_client_side_pointers_enabled_;
209 } 209 }
210 } 210 }
211 } 211 }
212 if (bound_element_array_buffer_id_ == id) {
213 bound_element_array_buffer_id_ = 0;
214 }
212 } 215 }
213 216
214 bool VertexArrayObject::BindElementArray(GLuint id) { 217 bool VertexArrayObject::BindElementArray(GLuint id) {
215 if (id == bound_element_array_buffer_id_) { 218 if (id == bound_element_array_buffer_id_) {
216 return false; 219 return false;
217 } 220 }
218 bound_element_array_buffer_id_ = id; 221 bound_element_array_buffer_id_ = id;
219 return true; 222 return true;
220 } 223 }
221 bool VertexArrayObject::HaveEnabledClientSideBuffers() const { 224 bool VertexArrayObject::HaveEnabledClientSideBuffers() const {
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 &simulated_client_side_buffers); 626 &simulated_client_side_buffers);
624 *simulated = *simulated || simulated_client_side_buffers; 627 *simulated = *simulated || simulated_client_side_buffers;
625 #endif // defined(GLES2_SUPPORT_CLIENT_SIDE_ARRAYS) 628 #endif // defined(GLES2_SUPPORT_CLIENT_SIDE_ARRAYS)
626 return true; 629 return true;
627 } 630 }
628 631
629 } // namespace gles2 632 } // namespace gles2
630 } // namespace gpu 633 } // namespace gpu
631 634
632 635
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/client/vertex_array_object_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698