| OLD | NEW |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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/indexed_buffer_binding_host.h" | 5 #include "gpu/command_buffer/service/indexed_buffer_binding_host.h" |
| 6 | 6 |
| 7 #include "gpu/command_buffer/service/buffer_manager.h" | 7 #include "gpu/command_buffer/service/buffer_manager.h" |
| 8 | 8 |
| 9 namespace gpu { | 9 namespace gpu { |
| 10 namespace gles2 { | 10 namespace gles2 { |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 offset = 0; | 73 offset = 0; |
| 74 size = 0; | 74 size = 0; |
| 75 effective_full_buffer_size = 0; | 75 effective_full_buffer_size = 0; |
| 76 } | 76 } |
| 77 | 77 |
| 78 | 78 |
| 79 IndexedBufferBindingHost::IndexedBufferBindingHost( | 79 IndexedBufferBindingHost::IndexedBufferBindingHost( |
| 80 uint32_t max_bindings, bool needs_emulation) | 80 uint32_t max_bindings, bool needs_emulation) |
| 81 : needs_emulation_(needs_emulation), | 81 : needs_emulation_(needs_emulation), |
| 82 max_non_null_binding_index_plus_one_(0u) { | 82 max_non_null_binding_index_plus_one_(0u) { |
| 83 DCHECK(needs_emulation); |
| 83 buffer_bindings_.resize(max_bindings); | 84 buffer_bindings_.resize(max_bindings); |
| 84 } | 85 } |
| 85 | 86 |
| 86 IndexedBufferBindingHost::~IndexedBufferBindingHost() { | 87 IndexedBufferBindingHost::~IndexedBufferBindingHost() { |
| 87 } | 88 } |
| 88 | 89 |
| 89 void IndexedBufferBindingHost::DoBindBufferBase( | 90 void IndexedBufferBindingHost::DoBindBufferBase( |
| 90 GLenum target, GLuint index, Buffer* buffer) { | 91 GLenum target, GLuint index, Buffer* buffer) { |
| 91 DCHECK_LT(index, buffer_bindings_.size()); | 92 DCHECK_LT(index, buffer_bindings_.size()); |
| 92 GLuint service_id = buffer ? buffer->service_id() : 0; | 93 GLuint service_id = buffer ? buffer->service_id() : 0; |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 max_non_null_binding_index_plus_one_ = ii; | 260 max_non_null_binding_index_plus_one_ = ii; |
| 260 break; | 261 break; |
| 261 } | 262 } |
| 262 } | 263 } |
| 263 } | 264 } |
| 264 } | 265 } |
| 265 } | 266 } |
| 266 | 267 |
| 267 } // namespace gles2 | 268 } // namespace gles2 |
| 268 } // namespace gpu | 269 } // namespace gpu |
| OLD | NEW |