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

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

Issue 16293004: Update gpu/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 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 | Annotate | Revision Log
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/vertex_array_manager.h" 5 #include "gpu/command_buffer/service/vertex_array_manager.h"
6 #include "base/debug/trace_event.h" 6 #include "base/debug/trace_event.h"
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "gpu/command_buffer/common/gles2_cmd_utils.h" 8 #include "gpu/command_buffer/common/gles2_cmd_utils.h"
9 #include "gpu/command_buffer/service/buffer_manager.h" 9 #include "gpu/command_buffer/service/buffer_manager.h"
10 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" 10 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
(...skipping 29 matching lines...) Expand all
40 40
41 VertexAttribManager* VertexArrayManager::GetVertexAttribManager( 41 VertexAttribManager* VertexArrayManager::GetVertexAttribManager(
42 GLuint client_id) { 42 GLuint client_id) {
43 VertexAttribManagerMap::iterator it = vertex_attrib_managers_.find(client_id); 43 VertexAttribManagerMap::iterator it = vertex_attrib_managers_.find(client_id);
44 return it != vertex_attrib_managers_.end() ? it->second : NULL; 44 return it != vertex_attrib_managers_.end() ? it->second : NULL;
45 } 45 }
46 46
47 void VertexArrayManager::RemoveVertexAttribManager(GLuint client_id) { 47 void VertexArrayManager::RemoveVertexAttribManager(GLuint client_id) {
48 VertexAttribManagerMap::iterator it = vertex_attrib_managers_.find(client_id); 48 VertexAttribManagerMap::iterator it = vertex_attrib_managers_.find(client_id);
49 if (it != vertex_attrib_managers_.end()) { 49 if (it != vertex_attrib_managers_.end()) {
50 VertexAttribManager* vertex_attrib_manager = it->second; 50 VertexAttribManager* vertex_attrib_manager = it->second.get();
51 vertex_attrib_manager->MarkAsDeleted(); 51 vertex_attrib_manager->MarkAsDeleted();
52 vertex_attrib_managers_.erase(it); 52 vertex_attrib_managers_.erase(it);
53 } 53 }
54 } 54 }
55 55
56 void VertexArrayManager::StartTracking( 56 void VertexArrayManager::StartTracking(
57 VertexAttribManager* /* vertex_attrib_manager */) { 57 VertexAttribManager* /* vertex_attrib_manager */) {
58 ++vertex_attrib_manager_count_; 58 ++vertex_attrib_manager_count_;
59 } 59 }
60 60
(...skipping 13 matching lines...) Expand all
74 return true; 74 return true;
75 } 75 }
76 } 76 }
77 return false; 77 return false;
78 } 78 }
79 79
80 } // namespace gles2 80 } // namespace gles2
81 } // namespace gpu 81 } // namespace gpu
82 82
83 83
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/texture_manager_unittest.cc ('k') | gpu/command_buffer/service/vertex_attrib_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698