OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CC_QUADS_LIST_CONTAINER_H_ | 5 #ifndef CC_QUADS_LIST_CONTAINER_H_ |
6 #define CC_QUADS_LIST_CONTAINER_H_ | 6 #define CC_QUADS_LIST_CONTAINER_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "cc/base/cc_export.h" | 10 #include "cc/base/cc_export.h" |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 } | 211 } |
212 | 212 |
213 size_t size() const; | 213 size_t size() const; |
214 bool empty() const; | 214 bool empty() const; |
215 void clear(); | 215 void clear(); |
216 | 216 |
217 size_t AvailableSizeWithoutAnotherAllocationForTesting() const; | 217 size_t AvailableSizeWithoutAnotherAllocationForTesting() const; |
218 | 218 |
219 private: | 219 private: |
220 // Hands out memory location for an element at the end of data structure. | 220 // Hands out memory location for an element at the end of data structure. |
221 BaseElementType* Allocate(size_t size_of_actual_element_in_bytes); | 221 void* Allocate(size_t size_of_actual_element_in_bytes); |
222 | 222 |
223 scoped_ptr<ListContainerCharAllocator> data_; | 223 scoped_ptr<ListContainerCharAllocator> data_; |
224 | 224 |
225 DISALLOW_COPY_AND_ASSIGN(ListContainer); | 225 DISALLOW_COPY_AND_ASSIGN(ListContainer); |
226 }; | 226 }; |
227 | 227 |
228 #if !defined(COMPILER_MSVC) | 228 #if !defined(COMPILER_MSVC) |
229 extern template class ListContainer<SharedQuadState>; | 229 extern template class ListContainer<SharedQuadState>; |
230 extern template class ListContainer<DrawQuad>; | 230 extern template class ListContainer<DrawQuad>; |
231 #endif | 231 #endif |
232 } // namespace cc | 232 } // namespace cc |
233 | 233 |
234 #endif // CC_QUADS_LIST_CONTAINER_H_ | 234 #endif // CC_QUADS_LIST_CONTAINER_H_ |
OLD | NEW |