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/service/context_group.h" | 5 #include "gpu/command_buffer/service/context_group.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 return false; | 199 return false; |
200 } | 200 } |
201 | 201 |
202 // TODO(zmo): Should we check max UNIFORM_BUFFER_OFFSET_ALIGNMENT is 256? | 202 // TODO(zmo): Should we check max UNIFORM_BUFFER_OFFSET_ALIGNMENT is 256? |
203 GetIntegerv(GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT, | 203 GetIntegerv(GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT, |
204 &uniform_buffer_offset_alignment_); | 204 &uniform_buffer_offset_alignment_); |
205 } | 205 } |
206 | 206 |
207 buffer_manager_.reset( | 207 buffer_manager_.reset( |
208 new BufferManager(memory_tracker_.get(), feature_info_.get())); | 208 new BufferManager(memory_tracker_.get(), feature_info_.get())); |
209 framebuffer_manager_.reset(new FramebufferManager( | 209 framebuffer_manager_.reset( |
210 max_draw_buffers_, max_color_attachments_, feature_info_->context_type(), | 210 new FramebufferManager(max_draw_buffers_, max_color_attachments_, |
211 framebuffer_completeness_cache_)); | 211 framebuffer_completeness_cache_)); |
212 renderbuffer_manager_.reset(new RenderbufferManager( | 212 renderbuffer_manager_.reset(new RenderbufferManager( |
213 memory_tracker_.get(), max_renderbuffer_size, max_samples, | 213 memory_tracker_.get(), max_renderbuffer_size, max_samples, |
214 feature_info_.get())); | 214 feature_info_.get())); |
215 shader_manager_.reset(new ShaderManager()); | 215 shader_manager_.reset(new ShaderManager()); |
216 sampler_manager_.reset(new SamplerManager(feature_info_.get())); | 216 sampler_manager_.reset(new SamplerManager(feature_info_.get())); |
217 | 217 |
218 // Lookup GL things we need to know. | 218 // Lookup GL things we need to know. |
219 const GLint kGLES2RequiredMinimumVertexAttribs = 8u; | 219 const GLint kGLES2RequiredMinimumVertexAttribs = 8u; |
220 if (!QueryGLFeatureU( | 220 if (!QueryGLFeatureU( |
221 GL_MAX_VERTEX_ATTRIBS, kGLES2RequiredMinimumVertexAttribs, | 221 GL_MAX_VERTEX_ATTRIBS, kGLES2RequiredMinimumVertexAttribs, |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
607 GLuint client_id, GLuint* service_id) const { | 607 GLuint client_id, GLuint* service_id) const { |
608 Buffer* buffer = buffer_manager_->GetBuffer(client_id); | 608 Buffer* buffer = buffer_manager_->GetBuffer(client_id); |
609 if (!buffer) | 609 if (!buffer) |
610 return false; | 610 return false; |
611 *service_id = buffer->service_id(); | 611 *service_id = buffer->service_id(); |
612 return true; | 612 return true; |
613 } | 613 } |
614 | 614 |
615 } // namespace gles2 | 615 } // namespace gles2 |
616 } // namespace gpu | 616 } // namespace gpu |
OLD | NEW |