| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 DisplayItemList_h | 5 #ifndef DisplayItemList_h |
| 6 #define DisplayItemList_h | 6 #define DisplayItemList_h |
| 7 | 7 |
| 8 #include "platform/graphics/ContiguousContainer.h" | 8 #include "platform/graphics/ContiguousContainer.h" |
| 9 #include "platform/graphics/paint/DisplayItem.h" | 9 #include "platform/graphics/paint/DisplayItem.h" |
| 10 #include "platform/graphics/paint/Transform3DDisplayItem.h" | 10 #include "platform/graphics/paint/Transform3DDisplayItem.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 return m_visualRects[index]; | 70 return m_visualRects[index]; |
| 71 } | 71 } |
| 72 | 72 |
| 73 void appendVisualRect(const IntRect& visualRect); | 73 void appendVisualRect(const IntRect& visualRect); |
| 74 | 74 |
| 75 #if ENABLE(ASSERT) | 75 #if ENABLE(ASSERT) |
| 76 void assertDisplayItemClientsAreAlive() const | 76 void assertDisplayItemClientsAreAlive() const |
| 77 { | 77 { |
| 78 for (auto& item : *this) { | 78 for (auto& item : *this) { |
| 79 #ifdef NDEBUG | 79 #ifdef NDEBUG |
| 80 ASSERT_WITH_MESSAGE(DisplayItemClient::isAlive(item.client()), "Shor
t-lived DisplayItemClient. See crbug.com/570030."); | 80 DCHECK(DisplayItemClient::isAlive(item.client())) << "Short-lived Di
splayItemClient. See crbug.com/570030."; |
| 81 #else | 81 #else |
| 82 ASSERT_WITH_MESSAGE(DisplayItemClient::isAlive(item.client()), "Shor
t-lived DisplayItemClient: %s. See crbug.com/570030.", item.clientDebugString().
utf8().data()); | 82 DCHECK(DisplayItemClient::isAlive(item.client())) << "Short-lived Di
splayItemClient: " << item.clientDebugString() << ". See crbug.com/570030."; |
| 83 #endif | 83 #endif |
| 84 } | 84 } |
| 85 } | 85 } |
| 86 #endif | 86 #endif |
| 87 | 87 |
| 88 // Useful for iterating with a range-based for loop. | 88 // Useful for iterating with a range-based for loop. |
| 89 template <typename Iterator> | 89 template <typename Iterator> |
| 90 class Range { | 90 class Range { |
| 91 public: | 91 public: |
| 92 Range(const Iterator& begin, const Iterator& end) | 92 Range(const Iterator& begin, const Iterator& end) |
| (...skipping 12 matching lines...) Expand all Loading... |
| 105 // given visual rect with the begin display item's visual rect. | 105 // given visual rect with the begin display item's visual rect. |
| 106 void growCurrentBeginItemVisualRect(const IntRect& visualRect); | 106 void growCurrentBeginItemVisualRect(const IntRect& visualRect); |
| 107 | 107 |
| 108 Vector<IntRect> m_visualRects; | 108 Vector<IntRect> m_visualRects; |
| 109 Vector<size_t> m_beginItemIndices; | 109 Vector<size_t> m_beginItemIndices; |
| 110 }; | 110 }; |
| 111 | 111 |
| 112 } // namespace blink | 112 } // namespace blink |
| 113 | 113 |
| 114 #endif // DisplayItemList_h | 114 #endif // DisplayItemList_h |
| OLD | NEW |