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

Side by Side Diff: Source/platform/graphics/paint/DisplayItemList.h

Issue 1313223002: Simplify subtree (now subsequence) caching (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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
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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 144
145 struct OutOfOrderIndexContext; 145 struct OutOfOrderIndexContext;
146 DisplayItems::iterator findOutOfOrderCachedItem(DisplayItems::iterator curre ntIt, const DisplayItem::Id&, OutOfOrderIndexContext&); 146 DisplayItems::iterator findOutOfOrderCachedItem(DisplayItems::iterator curre ntIt, const DisplayItem::Id&, OutOfOrderIndexContext&);
147 DisplayItems::iterator findOutOfOrderCachedItemForward(const DisplayItem::Id &, OutOfOrderIndexContext&); 147 DisplayItems::iterator findOutOfOrderCachedItemForward(DisplayItems::iterato r currentIt, const DisplayItem::Id&, OutOfOrderIndexContext&);
148 void copyCachedSubtree(DisplayItems::iterator& currentIt, DisplayItems& upda tedList); 148 void copyCachedSubtree(DisplayItems::iterator& currentIt, DisplayItems& upda tedList);
149 149
150 #if ENABLE(ASSERT) 150 #if ENABLE(ASSERT)
151 // The following two methods are for checking under-invalidations 151 // The following two methods are for checking under-invalidations
152 // (when RuntimeEnabledFeatures::slimmingPaintUnderInvalidationCheckingEnabl ed). 152 // (when RuntimeEnabledFeatures::slimmingPaintUnderInvalidationCheckingEnabl ed).
153 void checkCachedDisplayItemIsUnchanged(const DisplayItem&, DisplayItemIndice sByClientMap&); 153 void checkCachedDisplayItemIsUnchanged(const DisplayItem&, DisplayItemIndice sByClientMap&);
154 void checkNoRemainingCachedDisplayItems(); 154 void checkNoRemainingCachedDisplayItems();
155 #endif 155 #endif
156 156
157 void replay(GraphicsContext&); 157 void replay(GraphicsContext&);
(...skipping 23 matching lines...) Expand all
181 // 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
182 // updatePaintList(), but checking during add() helps developer easily find where 182 // updatePaintList(), but checking during add() helps developer easily find where
183 // the duplicated ids are from. 183 // the duplicated ids are from.
184 DisplayItemIndicesByClientMap m_newDisplayItemIndicesByClient; 184 DisplayItemIndicesByClientMap m_newDisplayItemIndicesByClient;
185 #endif 185 #endif
186 }; 186 };
187 187
188 } // namespace blink 188 } // namespace blink
189 189
190 #endif // DisplayItemList_h 190 #endif // DisplayItemList_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698