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 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 Loading... | |
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 checkUnderInvalidation(DisplayItemList::iterator& newIt, DisplayItemLis t::iterator& currentIt); | 215 void showUnderInvalidationError(const char* reason, const DisplayItem& newIt em, const DisplayItem& oldItem) const; |
216 void checkCachedDisplayItemIsUnchanged(const char* messagePrefix, const Disp layItem& newItem, const DisplayItem& oldItem); | 216 void checkUnderInvalidation(); |
217 bool isCheckingUnderInvalidation() const { return m_underInvalidationCheckin gEnd - m_underInvalidationCheckingBegin > 0; } | |
217 #endif | 218 #endif |
218 | 219 |
219 // The last complete paint artifact. | 220 // The last complete paint artifact. |
220 // In SPv2, this includes paint chunks as well as display items. | 221 // In SPv2, this includes paint chunks as well as display items. |
221 PaintArtifact m_currentPaintArtifact; | 222 PaintArtifact m_currentPaintArtifact; |
222 | 223 |
223 // Data being used to build the next paint artifact. | 224 // Data being used to build the next paint artifact. |
224 DisplayItemList m_newDisplayItemList; | 225 DisplayItemList m_newDisplayItemList; |
225 PaintChunker m_newPaintChunks; | 226 PaintChunker m_newPaintChunks; |
226 | 227 |
(...skipping 28 matching lines...) Expand all Loading... | |
255 | 256 |
256 DisplayItemClient::CacheGenerationOrInvalidationReason m_currentCacheGenerat ion; | 257 DisplayItemClient::CacheGenerationOrInvalidationReason m_currentCacheGenerat ion; |
257 | 258 |
258 #if DCHECK_IS_ON() | 259 #if DCHECK_IS_ON() |
259 int m_numSequentialMatches; | 260 int m_numSequentialMatches; |
260 int m_numOutOfOrderMatches; | 261 int m_numOutOfOrderMatches; |
261 int m_numIndexedItems; | 262 int m_numIndexedItems; |
262 | 263 |
263 // This is used to check duplicated ids during createAndAppend(). | 264 // This is used to check duplicated ids during createAndAppend(). |
264 DisplayItemIndicesByClientMap m_newDisplayItemIndicesByClient; | 265 DisplayItemIndicesByClientMap m_newDisplayItemIndicesByClient; |
266 | |
267 DisplayItemList::iterator m_underInvalidationCheckingBegin; | |
chrishtr
2016/07/15 00:57:44
Please document these a little bit.
| |
268 DisplayItemList::iterator m_underInvalidationCheckingEnd; | |
269 String m_underInvalidationMessagePrefix; | |
265 #endif | 270 #endif |
266 | 271 |
267 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS | 272 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS |
268 // A stack recording subsequence clients that are currently painting. | 273 // A stack recording subsequence clients that are currently painting. |
269 Vector<const DisplayItemClient*> m_currentSubsequenceClients; | 274 Vector<const DisplayItemClient*> m_currentSubsequenceClients; |
270 #endif | 275 #endif |
271 }; | 276 }; |
272 | 277 |
273 } // namespace blink | 278 } // namespace blink |
274 | 279 |
275 #endif // PaintController_h | 280 #endif // PaintController_h |
OLD | NEW |