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

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

Issue 1307653007: Fix assertion failure during out-of-order matching (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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
« no previous file with comments | « no previous file | Source/platform/graphics/paint/DisplayItemList.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/RuntimeEnabledFeatures.h" 9 #include "platform/RuntimeEnabledFeatures.h"
10 #include "platform/geometry/LayoutPoint.h" 10 #include "platform/geometry/LayoutPoint.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 #endif 172 #endif
173 173
174 // Indices into PaintList of all DrawingDisplayItems and BeginSubsequenceDis playItems of each client. 174 // Indices into PaintList of all DrawingDisplayItems and BeginSubsequenceDis playItems of each client.
175 // Temporarily used during merge to find out-of-order display items. 175 // Temporarily used during merge to find out-of-order display items.
176 using DisplayItemIndicesByClientMap = HashMap<DisplayItemClient, Vector<size _t>>; 176 using DisplayItemIndicesByClientMap = HashMap<DisplayItemClient, Vector<size _t>>;
177 177
178 static size_t findMatchingItemFromIndex(const DisplayItem::Id&, const Displa yItemIndicesByClientMap&, const DisplayItems&); 178 static size_t findMatchingItemFromIndex(const DisplayItem::Id&, const Displa yItemIndicesByClientMap&, const DisplayItems&);
179 static void addItemToIndexIfNeeded(const DisplayItem&, size_t index, Display ItemIndicesByClientMap&); 179 static void addItemToIndexIfNeeded(const DisplayItem&, size_t index, Display ItemIndicesByClientMap&);
180 180
181 struct OutOfOrderIndexContext; 181 struct OutOfOrderIndexContext;
182 DisplayItems::iterator findOutOfOrderCachedItem(DisplayItems::iterator curre ntIt, const DisplayItem::Id&, OutOfOrderIndexContext&); 182 DisplayItems::iterator findOutOfOrderCachedItem(const DisplayItem::Id&, OutO fOrderIndexContext&);
183 DisplayItems::iterator findOutOfOrderCachedItemForward(DisplayItems::iterato r currentIt, const DisplayItem::Id&, OutOfOrderIndexContext&); 183 DisplayItems::iterator findOutOfOrderCachedItemForward(const DisplayItem::Id &, OutOfOrderIndexContext&);
184 void copyCachedSubsequence(DisplayItems::iterator& currentIt, DisplayItems& updatedList); 184 void copyCachedSubsequence(DisplayItems::iterator& currentIt, DisplayItems& updatedList);
185 185
186 #if ENABLE(ASSERT) 186 #if ENABLE(ASSERT)
187 // The following two methods are for checking under-invalidations 187 // The following two methods are for checking under-invalidations
188 // (when RuntimeEnabledFeatures::slimmingPaintUnderInvalidationCheckingEnabl ed). 188 // (when RuntimeEnabledFeatures::slimmingPaintUnderInvalidationCheckingEnabl ed).
189 void checkCachedDisplayItemIsUnchanged(const DisplayItem&, DisplayItemIndice sByClientMap&); 189 void checkCachedDisplayItemIsUnchanged(const DisplayItem&, DisplayItemIndice sByClientMap&);
190 void checkNoRemainingCachedDisplayItems(); 190 void checkNoRemainingCachedDisplayItems();
191 #endif 191 #endif
192 192
193 void replay(GraphicsContext&); 193 void replay(GraphicsContext&);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 // the duplicated ids are from. 232 // the duplicated ids are from.
233 DisplayItemIndicesByClientMap m_newDisplayItemIndicesByClient; 233 DisplayItemIndicesByClientMap m_newDisplayItemIndicesByClient;
234 #endif 234 #endif
235 235
236 OwnPtr<Vector<String>> m_trackedPaintInvalidationObjects; 236 OwnPtr<Vector<String>> m_trackedPaintInvalidationObjects;
237 }; 237 };
238 238
239 } // namespace blink 239 } // namespace blink
240 240
241 #endif // DisplayItemList_h 241 #endif // DisplayItemList_h
OLDNEW
« no previous file with comments | « no previous file | Source/platform/graphics/paint/DisplayItemList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698