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 362326283e9e6eef30159a4b5bf83bd36f706ad2..a9d91a2fe116acb50917d17d948be95784d640a7 100644 |
--- a/third_party/WebKit/Source/platform/graphics/paint/PaintController.h |
+++ b/third_party/WebKit/Source/platform/graphics/paint/PaintController.h |
@@ -25,7 +25,6 @@ |
namespace blink { |
-class GraphicsLayer; |
class GraphicsContext; |
static const size_t kInitialDisplayItemListCapacityBytes = 512; |
@@ -42,8 +41,11 @@ public: |
return adoptPtr(new PaintController()); |
} |
- // These methods are called during paint invalidation (or paint if SlimmingPaintSynchronizedPainting is on). |
- void invalidate(const DisplayItemClientWrapper&, PaintInvalidationReason, const IntRect& previousPaintInvalidationRect, const IntRect& newPaintInvalidationRect); |
+ // These methods are called during paint invalidation (or paint if SlimmingPaintV2 is on). |
+ // |visualContentRect| can be nullptr if we know it's unchanged and PaintController has cached the previous value. |
+ // Otherwise we must pass a correct value (bounds of the display item client in coordinates of the |
chrishtr
2015/10/23 19:57:49
"bounds" needs to be defined here. I suggest just
Xianzhu
2015/10/23 20:56:53
Done.
chrishtr
2015/10/23 20:59:45
visualRect is ok then, with comment.
Xianzhu
2015/10/23 21:28:22
Done.
|
+ // PaintController's GraphicsLayer (spv1) or TODO(pdr): definition of it for spv2. |
+ void invalidate(const DisplayItemClientWrapper&, PaintInvalidationReason, const IntRect* visibleContentRect); |
void invalidateUntracked(DisplayItemClient); |
void invalidateAll(); |
@@ -103,9 +105,8 @@ public: |
void endSkippingCache() { ASSERT(m_skippingCacheCount > 0); --m_skippingCacheCount; } |
bool skippingCache() const { return m_skippingCacheCount; } |
- // Must be called when a painting is finished. If passed, invalidations are recorded on the given |
- // GraphicsLayer. |
- void commitNewDisplayItems(GraphicsLayer* = nullptr); |
+ // Must be called when a painting is finished. |
+ void commitNewDisplayItems(); |
// Returns the approximate memory usage, excluding memory likely to be |
// shared with the embedder after copying to WebPaintController. |
@@ -242,14 +243,10 @@ private: |
unsigned m_nextScope; |
Vector<unsigned> m_scopeStack; |
- struct Invalidation { |
- IntRect rect; |
- PaintInvalidationReason invalidationReason; |
- }; |
- |
- Vector<Invalidation> m_invalidations; |
- |
#if ENABLE(ASSERT) |
+ // Record the debug names of invalidated clients for assertion and debugging. |
+ Vector<String> m_invalidations; |
+ |
// This is used to check duplicated ids during add(). We could also check |
// during commitNewDisplayItems(), but checking during add() helps developer |
// easily find where the duplicated ids are from. |