Index: third_party/WebKit/Source/platform/graphics/paint/PaintController.h |
diff --git a/third_party/WebKit/Source/platform/graphics/paint/PaintController.h b/third_party/WebKit/Source/platform/graphics/paint/PaintController.h |
index bc639bdc451a79cbaf1c2d8d75374a8a4aa4e1b0..b8ab0ee71dd674673ece11967bf6ba26d906c24e 100644 |
--- a/third_party/WebKit/Source/platform/graphics/paint/PaintController.h |
+++ b/third_party/WebKit/Source/platform/graphics/paint/PaintController.h |
@@ -15,6 +15,7 @@ |
#include "platform/graphics/paint/PaintArtifact.h" |
#include "platform/graphics/paint/PaintChunk.h" |
#include "platform/graphics/paint/PaintChunker.h" |
+#include "platform/graphics/paint/RasterInvalidationTracking.h" |
#include "platform/graphics/paint/Transform3DDisplayItem.h" |
#include "third_party/skia/include/core/SkRefCnt.h" |
#include "wtf/Alignment.h" |
@@ -34,6 +35,8 @@ class GraphicsContext; |
static const size_t kInitialDisplayItemListCapacityBytes = 512; |
+template class RasterInvalidationTrackingMap<const PaintChunk>; |
+ |
// Responsible for processing display items as they are produced, and producing |
// a final paint artifact when complete. This class includes logic for caching, |
// cache invalidation, and merging. |
@@ -159,6 +162,9 @@ public: |
void assertDisplayItemClientsAreLive(); |
#endif |
+ void setTracksRasterInvalidations(bool value); |
+ RasterInvalidationTrackingMap<const PaintChunk>* paintChunksRasterInvalidationTrackingMap() { return m_paintChunksRasterInvalidationTrackingMap.get(); } |
+ |
protected: |
PaintController() |
: m_newDisplayItemList(0) |
@@ -176,6 +182,7 @@ protected: |
#endif |
{ |
resetCurrentListIndices(); |
+ setTracksRasterInvalidations(RuntimeEnabledFeatures::paintUnderInvalidationCheckingEnabled()); |
} |
private: |
@@ -214,6 +221,7 @@ private: |
void generateChunkRasterInvalidationRects(PaintChunk& newChunk); |
void generateChunkRasterInvalidationRectsComparingOldChunk(PaintChunk& newChunk, const PaintChunk& oldChunk); |
+ void addRasterInvalidationInfo(const DisplayItemClient*, PaintChunk&, const FloatRect&); |
// The following two methods are for checking under-invalidations |
// (when RuntimeEnabledFeatures::paintUnderInvalidationCheckingEnabled). |
@@ -270,6 +278,7 @@ private: |
IndicesByClientMap m_outOfOrderChunkIndices; |
size_t m_currentCachedSubsequenceBeginIndexInNewList; |
+ bool m_isTrackingPaintInvalidations; |
Xianzhu
2016/09/30 19:04:30
Nit: This seems not used.
chrishtr
2016/09/30 21:04:16
Fixed.
|
size_t m_nextChunkToMatch; |
DisplayItemClient::CacheGenerationOrInvalidationReason m_currentCacheGeneration; |
@@ -298,6 +307,8 @@ private: |
int m_skippedProbableUnderInvalidationCount; |
String m_underInvalidationMessagePrefix; |
+ std::unique_ptr<RasterInvalidationTrackingMap<const PaintChunk>> m_paintChunksRasterInvalidationTrackingMap; |
+ |
#if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS |
// A stack recording subsequence clients that are currently painting. |
Vector<const DisplayItemClient*> m_currentSubsequenceClients; |