Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(880)

Side by Side Diff: gpu/command_buffer/service/context_group.cc

Issue 301793003: During image destroy, delete textures only if we have a GL context. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Destroy GLImage during ContextGroup destroy Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 if (program_manager_ != NULL) { 317 if (program_manager_ != NULL) {
318 program_manager_->Destroy(have_context); 318 program_manager_->Destroy(have_context);
319 program_manager_.reset(); 319 program_manager_.reset();
320 } 320 }
321 321
322 if (shader_manager_ != NULL) { 322 if (shader_manager_ != NULL) {
323 shader_manager_->Destroy(have_context); 323 shader_manager_->Destroy(have_context);
324 shader_manager_.reset(); 324 shader_manager_.reset();
325 } 325 }
326 326
327 if (image_manager_ != NULL) {
328 image_manager_->Destroy(have_context);
reveman 2014/05/29 16:30:34 image_manager_.reset() for consistency
329 }
330
327 memory_tracker_ = NULL; 331 memory_tracker_ = NULL;
328 } 332 }
329 333
330 IdAllocatorInterface* ContextGroup::GetIdAllocator(unsigned namespace_id) { 334 IdAllocatorInterface* ContextGroup::GetIdAllocator(unsigned namespace_id) {
331 if (namespace_id >= arraysize(id_namespaces_)) 335 if (namespace_id >= arraysize(id_namespaces_))
332 return NULL; 336 return NULL;
333 337
334 return id_namespaces_[namespace_id].get(); 338 return id_namespaces_[namespace_id].get();
335 } 339 }
336 340
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 GLenum pname, GLint min_required, uint32* v) { 391 GLenum pname, GLint min_required, uint32* v) {
388 uint32 value = 0; 392 uint32 value = 0;
389 GetIntegerv(pname, &value); 393 GetIntegerv(pname, &value);
390 bool result = CheckGLFeatureU(min_required, &value); 394 bool result = CheckGLFeatureU(min_required, &value);
391 *v = value; 395 *v = value;
392 return result; 396 return result;
393 } 397 }
394 398
395 } // namespace gles2 399 } // namespace gles2
396 } // namespace gpu 400 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698