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/ContiguousContainer.h" | 9 #include "platform/graphics/ContiguousContainer.h" |
10 #include "platform/graphics/paint/DisplayItem.h" | 10 #include "platform/graphics/paint/DisplayItem.h" |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 #ifndef NDEBUG | 134 #ifndef NDEBUG |
135 WTF::String displayItemsAsDebugString(const DisplayItems&) const; | 135 WTF::String displayItemsAsDebugString(const DisplayItems&) const; |
136 #endif | 136 #endif |
137 | 137 |
138 // Indices into PaintList of all DrawingDisplayItems and BeginSubtreeDisplay
Items of each client. | 138 // Indices into PaintList of all DrawingDisplayItems and BeginSubtreeDisplay
Items of each client. |
139 // Temporarily used during merge to find out-of-order display items. | 139 // Temporarily used during merge to find out-of-order display items. |
140 using DisplayItemIndicesByClientMap = HashMap<DisplayItemClient, Vector<size
_t>>; | 140 using DisplayItemIndicesByClientMap = HashMap<DisplayItemClient, Vector<size
_t>>; |
141 | 141 |
142 static size_t findMatchingItemFromIndex(const DisplayItem::Id&, const Displa
yItemIndicesByClientMap&, const DisplayItems&); | 142 static size_t findMatchingItemFromIndex(const DisplayItem::Id&, const Displa
yItemIndicesByClientMap&, const DisplayItems&); |
143 static void addItemToIndexIfNeeded(const DisplayItem&, size_t index, Display
ItemIndicesByClientMap&); | 143 static void addItemToIndexIfNeeded(const DisplayItem&, size_t index, Display
ItemIndicesByClientMap&); |
144 DisplayItems::iterator findOutOfOrderCachedItem(DisplayItems::iterator curre
ntIt, const DisplayItem::Id&, DisplayItemIndicesByClientMap&); | 144 |
145 DisplayItems::iterator findOutOfOrderCachedItemForward(DisplayItems::iterato
r currentIt, const DisplayItem::Id&, DisplayItemIndicesByClientMap&); | 145 struct OutOfOrderIndexContext; |
| 146 DisplayItems::iterator findOutOfOrderCachedItem(DisplayItems::iterator curre
ntIt, const DisplayItem::Id&, OutOfOrderIndexContext&); |
| 147 DisplayItems::iterator findOutOfOrderCachedItemForward(const DisplayItem::Id
&, OutOfOrderIndexContext&); |
146 void copyCachedSubtree(DisplayItems::iterator& currentIt, DisplayItems& upda
tedList); | 148 void copyCachedSubtree(DisplayItems::iterator& currentIt, DisplayItems& upda
tedList); |
147 | 149 |
148 #if ENABLE(ASSERT) | 150 #if ENABLE(ASSERT) |
149 // The following two methods are for checking under-invalidations | 151 // The following two methods are for checking under-invalidations |
150 // (when RuntimeEnabledFeatures::slimmingPaintUnderInvalidationCheckingEnabl
ed). | 152 // (when RuntimeEnabledFeatures::slimmingPaintUnderInvalidationCheckingEnabl
ed). |
151 void checkCachedDisplayItemIsUnchanged(const DisplayItem&, DisplayItemIndice
sByClientMap&); | 153 void checkCachedDisplayItemIsUnchanged(const DisplayItem&, DisplayItemIndice
sByClientMap&); |
152 void checkNoRemainingCachedDisplayItems(); | 154 void checkNoRemainingCachedDisplayItems(); |
153 #endif | 155 #endif |
154 | 156 |
155 void replay(GraphicsContext&); | 157 void replay(GraphicsContext&); |
(...skipping 23 matching lines...) Expand all Loading... |
179 // This is used to check duplicated ids during add(). We could also check du
ring | 181 // This is used to check duplicated ids during add(). We could also check du
ring |
180 // updatePaintList(), but checking during add() helps developer easily find
where | 182 // updatePaintList(), but checking during add() helps developer easily find
where |
181 // the duplicated ids are from. | 183 // the duplicated ids are from. |
182 DisplayItemIndicesByClientMap m_newDisplayItemIndicesByClient; | 184 DisplayItemIndicesByClientMap m_newDisplayItemIndicesByClient; |
183 #endif | 185 #endif |
184 }; | 186 }; |
185 | 187 |
186 } // namespace blink | 188 } // namespace blink |
187 | 189 |
188 #endif // DisplayItemList_h | 190 #endif // DisplayItemList_h |
OLD | NEW |