Index: third_party/WebKit/Source/core/layout/LayoutObject.h |
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.h b/third_party/WebKit/Source/core/layout/LayoutObject.h |
index f417cda7e924dfa9a6c8d8b82ffda4a83e200ad5..a31ead4a2de2a41d83f38d841fc933f224665ac6 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutObject.h |
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.h |
@@ -1128,7 +1128,6 @@ public: |
// Invalidate the paint of a specific subrectangle within a given object. The rect is in the object's coordinate space. |
void invalidatePaintRectangle(const LayoutRect&) const; |
- void invalidatePaintRectangleNotInvalidatingDisplayItemClients(const LayoutRect&) const; |
// Walk the tree after layout issuing paint invalidations for layoutObjects that have changed or moved, updating bounds that have changed, and clearing paint invalidation state. |
virtual void invalidateTreeIfNeeded(const PaintInvalidationState&); |
@@ -1376,8 +1375,21 @@ public: |
virtual LayoutRect viewRect() const; |
- void invalidateDisplayItemClient(const DisplayItemClient&) const; |
- void invalidateDisplayItemClientsIncludingNonCompositingDescendants(const LayoutBoxModelObject* paintInvalidationContainer, PaintInvalidationReason) const; |
+ // TODO(wangxianzhu): Change the call sites to use the faster version if possible. |
+ void slowSetPaintingLayerNeedsRepaintAndInvalidateDisplayItemClient(const DisplayItemClient& client, PaintInvalidationReason reason) const |
+ { |
+ slowSetPaintingLayerNeedsRepaint(); |
+ invalidateDisplayItemClient(client, reason); |
+ } |
+ |
+ // The caller should ensure the painting layer has been setNeedsRepaint before calling this function. |
+ void invalidateDisplayItemClient(const DisplayItemClient&, PaintInvalidationReason) const; |
+ |
+ // Sets painting layer needsRepaint, then calls invaldiateDisplayItemClient(). |
+ // Should use this version when PaintInvalidationState is available. |
+ void invalidateDisplayItemClientWithPaintInvalidationState(const PaintInvalidationState&, const DisplayItemClient&, PaintInvalidationReason) const; |
chrishtr
2016/06/17 07:06:49
The naming here is inconsistent with slowSetPainti
Xianzhu
2016/06/17 18:39:31
Renamed to setPaintingLayerNeedsRepaintAndInvalida
|
+ |
+ void invalidateDisplayItemClientsIncludingNonCompositingDescendants(PaintInvalidationReason) const; |
// Called before anonymousChild.setStyle(). Override to set custom styles for the child. |
virtual void updateAnonymousChildStyle(const LayoutObject& anonymousChild, ComputedStyle& style) const { } |
@@ -1575,14 +1587,15 @@ protected: |
// not including children which will be invalidated normally during invalidateTreeIfNeeded() and |
// parts which are invalidated separately (e.g. scrollbars). |
// The caller should ensure the painting layer has been setNeedsRepaint before calling this function. |
- virtual void invalidateDisplayItemClients(const LayoutBoxModelObject& paintInvalidationContainer, PaintInvalidationReason) const; |
+ virtual void invalidateDisplayItemClients(PaintInvalidationReason) const; |
+ // This calls paintingLayer() which walks the tree up. |
chrishtr
2016/06/17 07:06:49
"walks up the tree"
Xianzhu
2016/06/17 18:39:31
Done.
|
// If possible, use the faster paintInvalidationState.paintingLayer().setNeedsRepaint(). |
- void setPaintingLayerNeedsRepaint() const; |
+ void slowSetPaintingLayerNeedsRepaint() const; |
- // Sets enclosing layer needsRepaint, then calls invalidateDisplayItemClients(). |
+ // Sets painting layer needsRepaint, then calls invalidateDisplayItemClients(). |
// Should use this version when PaintInvalidationState is available. |
- void invalidateDisplayItemClientsWithPaintInvalidationState(const LayoutBoxModelObject& paintInvalidationContainer, const PaintInvalidationState&, PaintInvalidationReason) const; |
+ void invalidateDisplayItemClientsWithPaintInvalidationState(const PaintInvalidationState&, PaintInvalidationReason) const; |
void setIsBackgroundAttachmentFixedObject(bool); |
@@ -1664,9 +1677,6 @@ private: |
static bool isAllowedToModifyLayoutTreeStructure(Document&); |
- // The passed rect is mutated into the coordinate space of the paint invalidation container. |
- const LayoutBoxModelObject* invalidatePaintRectangleInternal(const LayoutRect&) const; |
- |
// Returns the parent for paint invalidation. |
// - For LayoutView, returns the owner layout object in the containing frame if any or nullptr; |
// - For multi-column spanner, returns the spanner placeholder; |