Chromium Code Reviews| 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 a659ba9175ce51d228f2ce460454b97dd2e5b522..5881d845e45fac5c34f56ae08fbc48f062c57301 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutObject.h |
| +++ b/third_party/WebKit/Source/core/layout/LayoutObject.h |
| @@ -1584,6 +1584,10 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver, |
| // Called when the previous visual rect(s) is no longer valid. |
| virtual void clearPreviousVisualRects(); |
| + const LayoutPoint& previousPaintOffset() const { |
| + return m_previousPaintOffset; |
| + } |
| + |
| // Only adjusts if the paint invalidation container is not a composited |
| // scroller. |
| void adjustPreviousPaintInvalidationForScrollIfNeeded( |
| @@ -1679,6 +1683,9 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver, |
| void setPreviousVisualRect(const LayoutRect& r) { |
| m_layoutObject.setPreviousVisualRect(r); |
| } |
| + void setPreviousPaintOffset(const LayoutPoint& p) { |
| + m_layoutObject.m_previousPaintOffset = p; |
|
chrishtr
2016/11/10 18:42:00
DCHECK(slimmingPaintV2Enabled())
Xianzhu
2016/11/10 22:51:50
Added DCHECK(slimmingPaintInvalidationEnabled()).
|
| + } |
| void setHasPreviousLocationInBacking(bool b) { |
| m_layoutObject.m_bitfields.setHasPreviousLocationInBacking(b); |
| } |
| @@ -2343,10 +2350,15 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver, |
| // Store state between styleWillChange and styleDidChange |
| static bool s_affectsParentBlock; |
| - // This stores the visual rect from the previous frame. This rect does *not* |
| - // account for composited scrolling. See |
| + // This stores the visual rect computed by the latest paint invalidation. |
| + // This rect does *not* account for composited scrolling. See |
| // adjustVisualRectForCompositedScrolling(). |
| LayoutRect m_previousVisualRect; |
| + |
| + // This stores the paint offset computed by the latest paint property tree |
| + // building. It is relative to the containing transform space. It is the same |
| + // offset that will be used to paint the object on SPv2. |
| + LayoutPoint m_previousPaintOffset; |
| }; |
| // FIXME: remove this once the layout object lifecycle ASSERTS are no longer |