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

Side by Side Diff: cc/base/list_container.h

Issue 1159573002: cc: Move cc/quads/list_container.* files to cc/base. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « no previous file | cc/base/list_container.cc » ('j') | cc/playback/display_item_list.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_BASE_LIST_CONTAINER_H_
6 #define CC_QUADS_LIST_CONTAINER_H_ 6 #define CC_BASE_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"
11 11
12 namespace cc { 12 namespace cc {
13 class DisplayItem;
14 class DrawQuad;
15 class SharedQuadState;
16 13
17 // This class is a container type that handles allocating contiguous memory for 14 // This class is a container type that handles allocating contiguous memory for
18 // new elements and traversing through elements with either iterator or reverse 15 // new elements and traversing through elements with either iterator or reverse
19 // iterator. Since this container hands out raw pointers of its elements, it is 16 // iterator. Since this container hands out raw pointers of its elements, it is
20 // very important that this container never reallocate its memory so those raw 17 // very important that this container never reallocate its memory so those raw
21 // pointer will continue to be valid. This class is used to contain 18 // pointer will continue to be valid. This class is used to contain
22 // SharedQuadState or DrawQuad. Since the size of each DrawQuad varies, to hold 19 // SharedQuadState or DrawQuad. Since the size of each DrawQuad varies, to hold
23 // DrawQuads, the allocations size of each element in this class is 20 // DrawQuads, the allocations size of each element in this class is
24 // LargestDrawQuadSize while BaseElementType is DrawQuad. 21 // LargestDrawQuadSize while BaseElementType is DrawQuad.
25 template <class BaseElementType> 22 template <class BaseElementType>
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 222
226 private: 223 private:
227 // Hands out memory location for an element at the end of data structure. 224 // Hands out memory location for an element at the end of data structure.
228 void* Allocate(size_t size_of_actual_element_in_bytes); 225 void* Allocate(size_t size_of_actual_element_in_bytes);
229 226
230 scoped_ptr<ListContainerCharAllocator> data_; 227 scoped_ptr<ListContainerCharAllocator> data_;
231 228
232 DISALLOW_COPY_AND_ASSIGN(ListContainer); 229 DISALLOW_COPY_AND_ASSIGN(ListContainer);
233 }; 230 };
234 231
235 #if !defined(COMPILER_MSVC)
236 extern template class ListContainer<SharedQuadState>;
237 extern template class ListContainer<DrawQuad>;
238 extern template class ListContainer<DisplayItem>;
239 #endif
240 } // namespace cc 232 } // namespace cc
241 233
242 #endif // CC_QUADS_LIST_CONTAINER_H_ 234 #endif // CC_BASE_LIST_CONTAINER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/base/list_container.cc » ('j') | cc/playback/display_item_list.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698