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

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

Issue 1157653005: Move use of DisplayItemList's vector behind an explicit DisplayItems interface. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: DisplayItems must be noncopyable (Windows build fix) Created 5 years, 6 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 | Annotate | Revision Log
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

Powered by Google App Engine
This is Rietveld 408576698