| 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 | 152 |
| 153 void showDebugData() const { showDebugDataInternal(false); } | 153 void showDebugData() const { showDebugDataInternal(false); } |
| 154 #ifndef NDEBUG | 154 #ifndef NDEBUG |
| 155 void showDebugDataWithPictures() const { showDebugDataInternal(true); } | 155 void showDebugDataWithPictures() const { showDebugDataInternal(true); } |
| 156 #endif | 156 #endif |
| 157 | 157 |
| 158 #if DCHECK_IS_ON() | 158 #if DCHECK_IS_ON() |
| 159 void assertDisplayItemClientsAreLive(); | 159 void assertDisplayItemClientsAreLive(); |
| 160 #endif | 160 #endif |
| 161 | 161 |
| 162 void setTracksPaintInvalidations(bool value) { m_isTrackingPaintInvalidation
s = value; } |
| 163 |
| 162 protected: | 164 protected: |
| 163 PaintController() | 165 PaintController() |
| 164 : m_newDisplayItemList(0) | 166 : m_newDisplayItemList(0) |
| 165 , m_constructionDisabled(false) | 167 , m_constructionDisabled(false) |
| 166 , m_subsequenceCachingDisabled(false) | 168 , m_subsequenceCachingDisabled(false) |
| 167 , m_textPainted(false) | 169 , m_textPainted(false) |
| 168 , m_imagePainted(false) | 170 , m_imagePainted(false) |
| 169 , m_skippingCacheCount(0) | 171 , m_skippingCacheCount(0) |
| 170 , m_numCachedNewItems(0) | 172 , m_numCachedNewItems(0) |
| 171 , m_currentCachedSubsequenceBeginIndexInNewList(kNotFound) | 173 , m_currentCachedSubsequenceBeginIndexInNewList(kNotFound) |
| 174 , m_isTrackingPaintInvalidations(false) |
| 172 #ifndef NDEBUG | 175 #ifndef NDEBUG |
| 173 , m_numSequentialMatches(0) | 176 , m_numSequentialMatches(0) |
| 174 , m_numOutOfOrderMatches(0) | 177 , m_numOutOfOrderMatches(0) |
| 175 , m_numIndexedItems(0) | 178 , m_numIndexedItems(0) |
| 176 #endif | 179 #endif |
| 177 { | 180 { |
| 178 resetCurrentListIndices(); | 181 resetCurrentListIndices(); |
| 179 } | 182 } |
| 180 | 183 |
| 181 private: | 184 private: |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 | 266 |
| 264 // The next item in the current list to be indexed for out-of-order cache re
quests. | 267 // The next item in the current list to be indexed for out-of-order cache re
quests. |
| 265 size_t m_nextItemToIndex; | 268 size_t m_nextItemToIndex; |
| 266 | 269 |
| 267 // Similar to m_outOfOrderItemIndices but | 270 // Similar to m_outOfOrderItemIndices but |
| 268 // - the indices are chunk indices in m_currentPaintArtifacts.paintChunks(); | 271 // - the indices are chunk indices in m_currentPaintArtifacts.paintChunks(); |
| 269 // - chunks are matched not only for requests of cached display items, but a
lso non-cached display items. | 272 // - chunks are matched not only for requests of cached display items, but a
lso non-cached display items. |
| 270 IndicesByClientMap m_outOfOrderChunkIndices; | 273 IndicesByClientMap m_outOfOrderChunkIndices; |
| 271 | 274 |
| 272 size_t m_currentCachedSubsequenceBeginIndexInNewList; | 275 size_t m_currentCachedSubsequenceBeginIndexInNewList; |
| 276 bool m_isTrackingPaintInvalidations; |
| 273 size_t m_nextChunkToMatch; | 277 size_t m_nextChunkToMatch; |
| 274 | 278 |
| 275 DisplayItemClient::CacheGenerationOrInvalidationReason m_currentCacheGenerat
ion; | 279 DisplayItemClient::CacheGenerationOrInvalidationReason m_currentCacheGenerat
ion; |
| 276 | 280 |
| 277 #ifndef NDEBUG | 281 #ifndef NDEBUG |
| 278 int m_numSequentialMatches; | 282 int m_numSequentialMatches; |
| 279 int m_numOutOfOrderMatches; | 283 int m_numOutOfOrderMatches; |
| 280 int m_numIndexedItems; | 284 int m_numIndexedItems; |
| 281 #endif | 285 #endif |
| 282 | 286 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 300 | 304 |
| 301 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS | 305 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS |
| 302 // A stack recording subsequence clients that are currently painting. | 306 // A stack recording subsequence clients that are currently painting. |
| 303 Vector<const DisplayItemClient*> m_currentSubsequenceClients; | 307 Vector<const DisplayItemClient*> m_currentSubsequenceClients; |
| 304 #endif | 308 #endif |
| 305 }; | 309 }; |
| 306 | 310 |
| 307 } // namespace blink | 311 } // namespace blink |
| 308 | 312 |
| 309 #endif // PaintController_h | 313 #endif // PaintController_h |
| OLD | NEW |