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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/paint/PaintController.h

Issue 2156053002: Revert of New PaintController under-invalidation checking (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@CommitOnTheWay
Patch Set: Created 4 years, 5 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
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 PaintController_h 5 #ifndef PaintController_h
6 #define PaintController_h 6 #define PaintController_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/IntRect.h" 10 #include "platform/geometry/IntRect.h"
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 void copyCachedSubsequence(DisplayItemList::iterator&); 205 void copyCachedSubsequence(DisplayItemList::iterator&);
206 206
207 // Resets the iterators (e.g. m_nextItemToMatch) of m_currentPaintArtifact.g etDisplayItemList() 207 // Resets the iterators (e.g. m_nextItemToMatch) of m_currentPaintArtifact.g etDisplayItemList()
208 // to their initial values. This should be called when the DisplayItemList i n m_currentPaintArtifact 208 // to their initial values. This should be called when the DisplayItemList i n m_currentPaintArtifact
209 // is newly created, or is changed causing the previous iterators to be inva lid. 209 // is newly created, or is changed causing the previous iterators to be inva lid.
210 void resetCurrentListIterators(); 210 void resetCurrentListIterators();
211 211
212 #if DCHECK_IS_ON() 212 #if DCHECK_IS_ON()
213 // The following two methods are for checking under-invalidations 213 // The following two methods are for checking under-invalidations
214 // (when RuntimeEnabledFeatures::slimmingPaintUnderInvalidationCheckingEnabl ed). 214 // (when RuntimeEnabledFeatures::slimmingPaintUnderInvalidationCheckingEnabl ed).
215 void showUnderInvalidationError(const char* reason, const DisplayItem& newIt em, const DisplayItem& oldItem) const; 215 void checkUnderInvalidation(DisplayItemList::iterator& newIt, DisplayItemLis t::iterator& currentIt);
216 void checkUnderInvalidation(); 216 void checkCachedDisplayItemIsUnchanged(const char* messagePrefix, const Disp layItem& newItem, const DisplayItem& oldItem);
217 bool isCheckingUnderInvalidation() const { return m_underInvalidationCheckin gEnd - m_underInvalidationCheckingBegin > 0; }
218 #endif 217 #endif
219 218
220 // The last complete paint artifact. 219 // The last complete paint artifact.
221 // In SPv2, this includes paint chunks as well as display items. 220 // In SPv2, this includes paint chunks as well as display items.
222 PaintArtifact m_currentPaintArtifact; 221 PaintArtifact m_currentPaintArtifact;
223 222
224 // Data being used to build the next paint artifact. 223 // Data being used to build the next paint artifact.
225 DisplayItemList m_newDisplayItemList; 224 DisplayItemList m_newDisplayItemList;
226 PaintChunker m_newPaintChunks; 225 PaintChunker m_newPaintChunks;
227 226
(...skipping 28 matching lines...) Expand all
256 255
257 DisplayItemClient::CacheGenerationOrInvalidationReason m_currentCacheGenerat ion; 256 DisplayItemClient::CacheGenerationOrInvalidationReason m_currentCacheGenerat ion;
258 257
259 #if DCHECK_IS_ON() 258 #if DCHECK_IS_ON()
260 int m_numSequentialMatches; 259 int m_numSequentialMatches;
261 int m_numOutOfOrderMatches; 260 int m_numOutOfOrderMatches;
262 int m_numIndexedItems; 261 int m_numIndexedItems;
263 262
264 // This is used to check duplicated ids during createAndAppend(). 263 // This is used to check duplicated ids during createAndAppend().
265 DisplayItemIndicesByClientMap m_newDisplayItemIndicesByClient; 264 DisplayItemIndicesByClientMap m_newDisplayItemIndicesByClient;
266
267 // These are set in useCachedDrawingIfPossible() and useCachedSubsequenceIfP ossible()
268 // when we could use cached drawing or subsequence and under-invalidation ch ecking is on,
269 // indicating the begin and end of the cached drawing or subsequence in the current list.
270 // The functions return false to let the client do actual painting, and Pain tController
271 // will check if the actual painting results are the same as the cached.
272 DisplayItemList::iterator m_underInvalidationCheckingBegin;
273 DisplayItemList::iterator m_underInvalidationCheckingEnd;
274 String m_underInvalidationMessagePrefix;
275 #endif 265 #endif
276 266
277 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS 267 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS
278 // A stack recording subsequence clients that are currently painting. 268 // A stack recording subsequence clients that are currently painting.
279 Vector<const DisplayItemClient*> m_currentSubsequenceClients; 269 Vector<const DisplayItemClient*> m_currentSubsequenceClients;
280 #endif 270 #endif
281 }; 271 };
282 272
283 } // namespace blink 273 } // namespace blink
284 274
285 #endif // PaintController_h 275 #endif // PaintController_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698