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_BASE_LIST_CONTAINER_H_ | 5 #ifndef CC_BASE_LIST_CONTAINER_H_ |
6 #define CC_BASE_LIST_CONTAINER_H_ | 6 #define CC_BASE_LIST_CONTAINER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 | 11 |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "cc/base/cc_export.h" | |
15 #include "cc/base/list_container_helper.h" | 14 #include "cc/base/list_container_helper.h" |
16 | 15 |
17 namespace cc { | 16 namespace cc { |
18 | 17 |
19 // ListContainer is a container type that handles allocating contiguous memory | 18 // ListContainer is a container type that handles allocating contiguous memory |
20 // for new elements and traversing through elements with either iterator or | 19 // for new elements and traversing through elements with either iterator or |
21 // reverse iterator. Since this container hands out raw pointers of its | 20 // reverse iterator. Since this container hands out raw pointers of its |
22 // elements, it is very important that this container never reallocate its | 21 // elements, it is very important that this container never reallocate its |
23 // memory so those raw pointer will continue to be valid. This class is used to | 22 // memory so those raw pointer will continue to be valid. This class is used to |
24 // contain SharedQuadState or DrawQuad. Since the size of each DrawQuad varies, | 23 // contain SharedQuadState or DrawQuad. Since the size of each DrawQuad varies, |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 | 346 |
348 private: | 347 private: |
349 ListContainerHelper helper_; | 348 ListContainerHelper helper_; |
350 | 349 |
351 DISALLOW_COPY_AND_ASSIGN(ListContainer); | 350 DISALLOW_COPY_AND_ASSIGN(ListContainer); |
352 }; | 351 }; |
353 | 352 |
354 } // namespace cc | 353 } // namespace cc |
355 | 354 |
356 #endif // CC_BASE_LIST_CONTAINER_H_ | 355 #endif // CC_BASE_LIST_CONTAINER_H_ |
OLD | NEW |