| OLD | NEW |
| 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 #ifndef DisplayItemList_h | 5 #ifndef DisplayItemList_h |
| 6 #define DisplayItemList_h | 6 #define DisplayItemList_h |
| 7 | 7 |
| 8 #include "platform/PlatformExport.h" | 8 #include "platform/PlatformExport.h" |
| 9 #include "platform/graphics/paint/DisplayItem.h" | 9 #include "platform/graphics/paint/DisplayItem.h" |
| 10 #include "platform/graphics/paint/DisplayItems.h" | 10 #include "platform/graphics/paint/DisplayItems.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 #ifndef NDEBUG | 82 #ifndef NDEBUG |
| 83 WTF::String displayItemsAsDebugString(const DisplayItems&) const; | 83 WTF::String displayItemsAsDebugString(const DisplayItems&) const; |
| 84 #endif | 84 #endif |
| 85 | 85 |
| 86 // Indices into PaintList of all DrawingDisplayItems and BeginSubtreeDisplay
Items of each client. | 86 // Indices into PaintList of all DrawingDisplayItems and BeginSubtreeDisplay
Items of each client. |
| 87 // Temporarily used during merge to find out-of-order display items. | 87 // Temporarily used during merge to find out-of-order display items. |
| 88 using DisplayItemIndicesByClientMap = HashMap<DisplayItemClient, Vector<size
_t>>; | 88 using DisplayItemIndicesByClientMap = HashMap<DisplayItemClient, Vector<size
_t>>; |
| 89 | 89 |
| 90 static size_t findMatchingItemFromIndex(const DisplayItem::Id&, DisplayItem:
:Type matchingType, const DisplayItemIndicesByClientMap&, const DisplayItems&); | 90 static size_t findMatchingItemFromIndex(const DisplayItem::Id&, DisplayItem:
:Type matchingType, const DisplayItemIndicesByClientMap&, const DisplayItems&); |
| 91 static void addItemToIndex(DisplayItemClient, DisplayItem::Type, size_t inde
x, DisplayItemIndicesByClientMap&); | 91 static void addItemToIndex(DisplayItemClient, DisplayItem::Type, size_t inde
x, DisplayItemIndicesByClientMap&); |
| 92 DisplayItems::Iterator findOutOfOrderCachedItem(DisplayItems::Iterator& curr
entIt, const DisplayItem::Id&, DisplayItem::Type, DisplayItemIndicesByClientMap&
); | 92 DisplayItems::Iterator findOutOfOrderCachedItem(DisplayItems::Iterator curre
ntIt, const DisplayItem::Id&, DisplayItem::Type, DisplayItemIndicesByClientMap&)
; |
| 93 DisplayItems::Iterator findOutOfOrderCachedItemForward(DisplayItems::Iterato
r& currentIt, const DisplayItem::Id&, DisplayItem::Type, DisplayItemIndicesByCli
entMap&); | 93 DisplayItems::Iterator findOutOfOrderCachedItemForward(DisplayItems::Iterato
r currentIt, const DisplayItem::Id&, DisplayItem::Type, DisplayItemIndicesByClie
ntMap&); |
| 94 | 94 |
| 95 #if ENABLE(ASSERT) | 95 #if ENABLE(ASSERT) |
| 96 // The following two methods are for checking under-invalidations | 96 // The following two methods are for checking under-invalidations |
| 97 // (when RuntimeEnabledFeatures::slimmingPaintUnderInvalidationCheckingEnabl
ed). | 97 // (when RuntimeEnabledFeatures::slimmingPaintUnderInvalidationCheckingEnabl
ed). |
| 98 void checkCachedDisplayItemIsUnchanged(const DisplayItems::ItemHandle&, Disp
layItemIndicesByClientMap&); | 98 void checkCachedDisplayItemIsUnchanged(const DisplayItems::ItemHandle&, Disp
layItemIndicesByClientMap&); |
| 99 void checkNoRemainingCachedDisplayItems(); | 99 void checkNoRemainingCachedDisplayItems(); |
| 100 #endif | 100 #endif |
| 101 | 101 |
| 102 void replay(GraphicsContext&) const; | 102 void replay(GraphicsContext&) const; |
| 103 | 103 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 133 // This is used to check duplicated ids during add(). We could also check du
ring | 133 // This is used to check duplicated ids during add(). We could also check du
ring |
| 134 // updatePaintList(), but checking during add() helps developer easily find
where | 134 // updatePaintList(), but checking during add() helps developer easily find
where |
| 135 // the duplicated ids are from. | 135 // the duplicated ids are from. |
| 136 DisplayItemIndicesByClientMap m_newDisplayItemIndicesByClient; | 136 DisplayItemIndicesByClientMap m_newDisplayItemIndicesByClient; |
| 137 #endif | 137 #endif |
| 138 }; | 138 }; |
| 139 | 139 |
| 140 } // namespace blink | 140 } // namespace blink |
| 141 | 141 |
| 142 #endif // DisplayItemList_h | 142 #endif // DisplayItemList_h |
| OLD | NEW |