OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "app/gfx/gl/gl_implementation.h" | 5 #include "app/gfx/gl/gl_implementation.h" |
6 #include "gpu/command_buffer/service/context_group.h" | 6 #include "gpu/command_buffer/service/context_group.h" |
7 #include "gpu/command_buffer/common/id_allocator.h" | 7 #include "gpu/command_buffer/common/id_allocator.h" |
8 #include "gpu/command_buffer/service/buffer_manager.h" | 8 #include "gpu/command_buffer/service/buffer_manager.h" |
9 #include "gpu/command_buffer/service/framebuffer_manager.h" | 9 #include "gpu/command_buffer/service/framebuffer_manager.h" |
10 #include "gpu/command_buffer/service/program_manager.h" | 10 #include "gpu/command_buffer/service/program_manager.h" |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 } else { | 199 } else { |
200 GetIntegerv( | 200 GetIntegerv( |
201 GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, &max_fragment_uniform_vectors_); | 201 GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, &max_fragment_uniform_vectors_); |
202 max_fragment_uniform_vectors_ /= 4; | 202 max_fragment_uniform_vectors_ /= 4; |
203 GetIntegerv(GL_MAX_VARYING_FLOATS, &max_varying_vectors_); | 203 GetIntegerv(GL_MAX_VARYING_FLOATS, &max_varying_vectors_); |
204 max_varying_vectors_ /= 4; | 204 max_varying_vectors_ /= 4; |
205 GetIntegerv(GL_MAX_VERTEX_UNIFORM_COMPONENTS, &max_vertex_uniform_vectors_); | 205 GetIntegerv(GL_MAX_VERTEX_UNIFORM_COMPONENTS, &max_vertex_uniform_vectors_); |
206 max_vertex_uniform_vectors_ /= 4; | 206 max_vertex_uniform_vectors_ /= 4; |
207 } | 207 } |
208 | 208 |
| 209 if (!texture_manager_->Initialize()) { |
| 210 return false; |
| 211 } |
| 212 |
209 initialized_ = true; | 213 initialized_ = true; |
210 return true; | 214 return true; |
211 } | 215 } |
212 | 216 |
213 void ContextGroup::Destroy(bool have_context) { | 217 void ContextGroup::Destroy(bool have_context) { |
214 if (buffer_manager_ != NULL) { | 218 if (buffer_manager_ != NULL) { |
215 buffer_manager_->Destroy(have_context); | 219 buffer_manager_->Destroy(have_context); |
216 buffer_manager_.reset(); | 220 buffer_manager_.reset(); |
217 } | 221 } |
218 | 222 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 } | 257 } |
254 IdAllocator* id_allocator = new IdAllocator(); | 258 IdAllocator* id_allocator = new IdAllocator(); |
255 id_namespaces_[namespace_id] = linked_ptr<IdAllocator>(id_allocator); | 259 id_namespaces_[namespace_id] = linked_ptr<IdAllocator>(id_allocator); |
256 return id_allocator; | 260 return id_allocator; |
257 } | 261 } |
258 | 262 |
259 } // namespace gles2 | 263 } // namespace gles2 |
260 } // namespace gpu | 264 } // namespace gpu |
261 | 265 |
262 | 266 |
OLD | NEW |