| OLD | NEW |
| (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 |
| OLD | NEW |