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

Side by Side Diff: Source/platform/graphics/paint/DisplayItems.cpp

Issue 1193433004: Blink-side contiguous allocation of display items. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add ListContainer::AllocateAndConstructWithArguments and a TODO in DisplayItemList::findMatchingIte… Created 5 years, 5 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
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "config.h"
6 #include "platform/graphics/paint/DisplayItems.h"
7
8 namespace blink {
9
10 DisplayItems::DisplayItems()
11 {
12 }
13
14 DisplayItems::~DisplayItems()
15 {
16 }
17
18 void DisplayItems::append(PassOwnPtr<DisplayItem> displayItem)
19 {
20 m_items.append(displayItem);
21 }
22
23 void DisplayItems::appendByMoving(const Iterator& it)
24 {
25 // Release the underlying OwnPtr to move the display item ownership.
26 ASSERT(!it->isGone());
27 append(it.m_iterator->release());
28 }
29
30 void DisplayItems::removeLast()
31 {
32 m_items.removeLast();
33 }
34
35 void DisplayItems::clear()
36 {
37 m_items.clear();
38 }
39
40 void DisplayItems::swap(DisplayItems& other)
41 {
42 m_items.swap(other.m_items);
43 }
44
45 void DisplayItems::setGone(const Iterator& it)
46 {
47 it.m_iterator->clear();
48 }
49
50 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/graphics/paint/DisplayItems.h ('k') | Source/platform/graphics/paint/DrawingDisplayItem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698