OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |