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 "../client/atomicops.h" | 5 #include "../client/atomicops.h" |
6 #include "../client/share_group.h" | 6 #include "../client/share_group.h" |
7 #include "../client/gles2_implementation.h" | 7 #include "../client/gles2_implementation.h" |
8 #include "../client/program_info_manager.h" | 8 #include "../client/program_info_manager.h" |
9 #include "../common/id_allocator.h" | 9 #include "../common/id_allocator.h" |
10 #include "../common/logging.h" | 10 #include "../common/logging.h" |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 new NonReusedIdHandler())); | 216 new NonReusedIdHandler())); |
217 } else { | 217 } else { |
218 id_handlers_[i].reset(new ThreadSafeIdHandlerWrapper( | 218 id_handlers_[i].reset(new ThreadSafeIdHandlerWrapper( |
219 new StrictIdHandler())); | 219 new StrictIdHandler())); |
220 } | 220 } |
221 } | 221 } |
222 } | 222 } |
223 program_info_manager_.reset(ProgramInfoManager::Create(false)); | 223 program_info_manager_.reset(ProgramInfoManager::Create(false)); |
224 } | 224 } |
225 | 225 |
| 226 void ShareGroup::SetGLES2ImplementationForDestruction( |
| 227 GLES2Implementation* gl_impl) { |
| 228 gles2_ = gl_impl; |
| 229 } |
| 230 |
226 ShareGroup::~ShareGroup() { | 231 ShareGroup::~ShareGroup() { |
227 for (int i = 0; i < id_namespaces::kNumIdNamespaces; ++i) { | 232 for (int i = 0; i < id_namespaces::kNumIdNamespaces; ++i) { |
228 id_handlers_[i]->Destroy(gles2_); | 233 id_handlers_[i]->Destroy(gles2_); |
229 id_handlers_[i].reset(); | 234 id_handlers_[i].reset(); |
230 } | 235 } |
231 } | 236 } |
232 | 237 |
233 void ShareGroup::SetGLES2ImplementationForDestruction( | |
234 GLES2Implementation* gl_impl) { | |
235 gles2_ = gl_impl; | |
236 } | |
237 | |
238 | |
239 } // namespace gles2 | 238 } // namespace gles2 |
240 } // namespace gpu | 239 } // namespace gpu |
OLD | NEW |