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

Side by Side Diff: cc/quads/list_container.cc

Issue 1123983002: cc: Use a ListContainer for DisplayItemList to reduce allocations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: displaylistcontainer: fixdcheck 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 | « cc/quads/list_container.h ('k') | cc/resources/clip_display_item.h » ('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 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 #include "cc/quads/list_container.h" 5 #include "cc/quads/list_container.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "cc/base/scoped_ptr_vector.h" 10 #include "cc/base/scoped_ptr_vector.h"
11 #include "cc/quads/draw_quad.h" 11 #include "cc/quads/draw_quad.h"
12 #include "cc/quads/shared_quad_state.h" 12 #include "cc/quads/shared_quad_state.h"
13 #include "cc/resources/display_item.h"
13 14
14 namespace { 15 namespace {
15 const size_t kDefaultNumElementTypesToReserve = 32; 16 const size_t kDefaultNumElementTypesToReserve = 32;
16 } // namespace 17 } // namespace
17 18
18 namespace cc { 19 namespace cc {
19 20
20 // ListContainerCharAllocator 21 // ListContainerCharAllocator
21 //////////////////////////////////////////////////// 22 ////////////////////////////////////////////////////
22 // This class deals only with char* and void*. It does allocation and passing 23 // This class deals only with char* and void*. It does allocation and passing
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 return *this; 708 return *this;
708 } 709 }
709 710
710 template <typename BaseElementType> 711 template <typename BaseElementType>
711 size_t ListContainer<BaseElementType>::ConstReverseIterator::index() const { 712 size_t ListContainer<BaseElementType>::ConstReverseIterator::index() const {
712 return index_; 713 return index_;
713 } 714 }
714 715
715 template class ListContainer<SharedQuadState>; 716 template class ListContainer<SharedQuadState>;
716 template class ListContainer<DrawQuad>; 717 template class ListContainer<DrawQuad>;
718 template class ListContainer<DisplayItem>;
717 719
718 } // namespace cc 720 } // namespace cc
OLDNEW
« no previous file with comments | « cc/quads/list_container.h ('k') | cc/resources/clip_display_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698