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

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

Issue 10874054: Add WARN_UNUSED_RESULT to scoped_refptr::release. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Don't assign NULL to pointer to scoped_refptr. Created 8 years, 3 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
« no previous file with comments | « chrome/service/cloud_print/cloud_print_connector.cc ('k') | net/http/http_response_headers.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « chrome/service/cloud_print/cloud_print_connector.cc ('k') | net/http/http_response_headers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698