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

Side by Side Diff: gpu/command_buffer/service/buffer_manager.h

Issue 2880013: Free the resources used by a context group. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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
« no previous file with comments | « no previous file | gpu/command_buffer/service/buffer_manager.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #ifndef GPU_COMMAND_BUFFER_SERVICE_BUFFER_MANAGER_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_BUFFER_MANAGER_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_BUFFER_MANAGER_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_BUFFER_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 scoped_array<int8> shadow_; 136 scoped_array<int8> shadow_;
137 137
138 // A map of ranges to the highest value in that range of a certain type. 138 // A map of ranges to the highest value in that range of a certain type.
139 typedef std::map<Range, GLuint, Range::Less> RangeToMaxValueMap; 139 typedef std::map<Range, GLuint, Range::Less> RangeToMaxValueMap;
140 RangeToMaxValueMap range_set_; 140 RangeToMaxValueMap range_set_;
141 }; 141 };
142 142
143 BufferManager() 143 BufferManager()
144 : allow_buffers_on_multiple_targets_(false) { 144 : allow_buffers_on_multiple_targets_(false) {
145 } 145 }
146 ~BufferManager();
147
148 // Must call before destruction.
149 void Destroy(bool have_context);
146 150
147 // Creates a BufferInfo for the given buffer. 151 // Creates a BufferInfo for the given buffer.
148 void CreateBufferInfo(GLuint client_id, GLuint service_id); 152 void CreateBufferInfo(GLuint client_id, GLuint service_id);
149 153
150 // Gets the buffer info for the given buffer. 154 // Gets the buffer info for the given buffer.
151 BufferInfo* GetBufferInfo(GLuint client_id); 155 BufferInfo* GetBufferInfo(GLuint client_id);
152 156
153 // Removes a buffer info for the given buffer. 157 // Removes a buffer info for the given buffer.
154 void RemoveBufferInfo(GLuint client_id); 158 void RemoveBufferInfo(GLuint client_id);
155 159
(...skipping 21 matching lines...) Expand all
177 181
178 DISALLOW_COPY_AND_ASSIGN(BufferManager); 182 DISALLOW_COPY_AND_ASSIGN(BufferManager);
179 }; 183 };
180 184
181 } // namespace gles2 185 } // namespace gles2
182 } // namespace gpu 186 } // namespace gpu
183 187
184 #endif // GPU_COMMAND_BUFFER_SERVICE_BUFFER_MANAGER_H_ 188 #endif // GPU_COMMAND_BUFFER_SERVICE_BUFFER_MANAGER_H_
185 189
186 190
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/service/buffer_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698