| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 if (program_manager_ != NULL) { | 240 if (program_manager_ != NULL) { |
| 241 program_manager_->Destroy(have_context); | 241 program_manager_->Destroy(have_context); |
| 242 program_manager_.reset(); | 242 program_manager_.reset(); |
| 243 } | 243 } |
| 244 | 244 |
| 245 if (shader_manager_ != NULL) { | 245 if (shader_manager_ != NULL) { |
| 246 shader_manager_->Destroy(have_context); | 246 shader_manager_->Destroy(have_context); |
| 247 shader_manager_.reset(); | 247 shader_manager_.reset(); |
| 248 } | 248 } |
| 249 | 249 |
| 250 if (memory_tracker_.get()) { | 250 memory_tracker_ = NULL; |
| 251 memory_tracker_.release(); | |
| 252 } | |
| 253 } | 251 } |
| 254 | 252 |
| 255 IdAllocatorInterface* ContextGroup::GetIdAllocator(unsigned namespace_id) { | 253 IdAllocatorInterface* ContextGroup::GetIdAllocator(unsigned namespace_id) { |
| 256 if (namespace_id >= arraysize(id_namespaces_)) | 254 if (namespace_id >= arraysize(id_namespaces_)) |
| 257 return NULL; | 255 return NULL; |
| 258 | 256 |
| 259 return id_namespaces_[namespace_id].get(); | 257 return id_namespaces_[namespace_id].get(); |
| 260 } | 258 } |
| 261 | 259 |
| 262 uint32 ContextGroup::GetMemRepresented() const { | 260 uint32 ContextGroup::GetMemRepresented() const { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 GLenum pname, GLint min_required, uint32* v) { | 302 GLenum pname, GLint min_required, uint32* v) { |
| 305 uint32 value = 0; | 303 uint32 value = 0; |
| 306 GetIntegerv(pname, &value); | 304 GetIntegerv(pname, &value); |
| 307 bool result = CheckGLFeatureU(min_required, &value); | 305 bool result = CheckGLFeatureU(min_required, &value); |
| 308 *v = value; | 306 *v = value; |
| 309 return result; | 307 return result; |
| 310 } | 308 } |
| 311 | 309 |
| 312 } // namespace gles2 | 310 } // namespace gles2 |
| 313 } // namespace gpu | 311 } // namespace gpu |
| 314 | |
| 315 | |
| OLD | NEW |