| OLD | NEW |
| 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 "gpu/command_buffer/client/vertex_array_object_manager.h" | 5 #include "gpu/command_buffer/client/vertex_array_object_manager.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "gpu/command_buffer/client/gles2_cmd_helper.h" | 8 #include "gpu/command_buffer/client/gles2_cmd_helper.h" |
| 9 #include "gpu/command_buffer/client/gles2_implementation.h" | 9 #include "gpu/command_buffer/client/gles2_implementation.h" |
| 10 | 10 |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 break; | 275 break; |
| 276 case GL_VERTEX_ATTRIB_ARRAY_STRIDE: | 276 case GL_VERTEX_ATTRIB_ARRAY_STRIDE: |
| 277 *param = attrib->stride(); | 277 *param = attrib->stride(); |
| 278 break; | 278 break; |
| 279 case GL_VERTEX_ATTRIB_ARRAY_TYPE: | 279 case GL_VERTEX_ATTRIB_ARRAY_TYPE: |
| 280 *param = attrib->type(); | 280 *param = attrib->type(); |
| 281 break; | 281 break; |
| 282 case GL_VERTEX_ATTRIB_ARRAY_NORMALIZED: | 282 case GL_VERTEX_ATTRIB_ARRAY_NORMALIZED: |
| 283 *param = attrib->normalized(); | 283 *param = attrib->normalized(); |
| 284 break; | 284 break; |
| 285 case GL_VERTEX_ATTRIB_ARRAY_INTEGER: |
| 286 // TODO(zmo): cache this on the client side. |
| 287 return false; |
| 285 default: | 288 default: |
| 286 return false; // pass through to service side. | 289 return false; // pass through to service side. |
| 287 break; | |
| 288 } | 290 } |
| 289 return true; | 291 return true; |
| 290 } | 292 } |
| 291 | 293 |
| 292 void VertexArrayObject::SetAttribDivisor(GLuint index, GLuint divisor) { | 294 void VertexArrayObject::SetAttribDivisor(GLuint index, GLuint divisor) { |
| 293 if (index < vertex_attribs_.size()) { | 295 if (index < vertex_attribs_.size()) { |
| 294 VertexAttrib& attrib = vertex_attribs_[index]; | 296 VertexAttrib& attrib = vertex_attribs_[index]; |
| 295 attrib.SetDivisor(divisor); | 297 attrib.SetDivisor(divisor); |
| 296 } | 298 } |
| 297 } | 299 } |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 625 function_name, gl, gl_helper, num_elements, primcount, | 627 function_name, gl, gl_helper, num_elements, primcount, |
| 626 &simulated_client_side_buffers); | 628 &simulated_client_side_buffers); |
| 627 *simulated = *simulated || simulated_client_side_buffers; | 629 *simulated = *simulated || simulated_client_side_buffers; |
| 628 return true; | 630 return true; |
| 629 } | 631 } |
| 630 | 632 |
| 631 } // namespace gles2 | 633 } // namespace gles2 |
| 632 } // namespace gpu | 634 } // namespace gpu |
| 633 | 635 |
| 634 | 636 |
| OLD | NEW |