Chromium Code Reviews| 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 2e789edc90e4153587f76fda2c710013fb478f7d..6e877ffe2f427212165c647b5b639b4b2db9e1a3 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 kInitialDisplayItemListCapacity = 64; |
| @@ -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). |
| + // |bounds| 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 |
| + // PaintController's GraphicsLayer (spv1) or TODO(pdr): definition of it for spv2. |
| + void invalidate(const DisplayItemClientWrapper&, PaintInvalidationReason, const IntRect* bounds); |
|
chrishtr
2015/10/23 17:15:07
visibleContentRect
Xianzhu
2015/10/23 18:43:27
Done.
|
| 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. |