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

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: WIP - review comments addressed. 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_)
328 image_manager_->Destroy(have_context);
reveman 2014/06/03 13:57:39 This is not right. What if the image manager is us
sohanjg 2014/06/03 15:09:20 Done.
329
327 memory_tracker_ = NULL; 330 memory_tracker_ = NULL;
328 } 331 }
329 332
330 IdAllocatorInterface* ContextGroup::GetIdAllocator(unsigned namespace_id) { 333 IdAllocatorInterface* ContextGroup::GetIdAllocator(unsigned namespace_id) {
331 if (namespace_id >= arraysize(id_namespaces_)) 334 if (namespace_id >= arraysize(id_namespaces_))
332 return NULL; 335 return NULL;
333 336
334 return id_namespaces_[namespace_id].get(); 337 return id_namespaces_[namespace_id].get();
335 } 338 }
336 339
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 GLenum pname, GLint min_required, uint32* v) { 390 GLenum pname, GLint min_required, uint32* v) {
388 uint32 value = 0; 391 uint32 value = 0;
389 GetIntegerv(pname, &value); 392 GetIntegerv(pname, &value);
390 bool result = CheckGLFeatureU(min_required, &value); 393 bool result = CheckGLFeatureU(min_required, &value);
391 *v = value; 394 *v = value;
392 return result; 395 return result;
393 } 396 }
394 397
395 } // namespace gles2 398 } // namespace gles2
396 } // namespace gpu 399 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698