Chromium Code Reviews| Index: Source/core/layout/LayoutObject.h |
| diff --git a/Source/core/layout/LayoutObject.h b/Source/core/layout/LayoutObject.h |
| index 06e8d0270fba1af8f836169364b4e2f30ebf0d3b..059f11ca016054bb40673ea5d065996180ac2b58 100644 |
| --- a/Source/core/layout/LayoutObject.h |
| +++ b/Source/core/layout/LayoutObject.h |
| @@ -1009,6 +1009,10 @@ public: |
| const LayoutPoint& previousPositionFromPaintInvalidationBacking() const { return m_previousPositionFromPaintInvalidationBacking; } |
| void setPreviousPositionFromPaintInvalidationBacking(const LayoutPoint& positionFromPaintInvalidationBacking) { m_previousPositionFromPaintInvalidationBacking = positionFromPaintInvalidationBacking; } |
| + // Cache of the previous paint offset for slimming paint v2. |
| + const LayoutPoint& cachedPaintOffset() const; |
| + void updateCachedPaintOffset(const LayoutPoint&) const; |
| + |
| PaintInvalidationReason fullPaintInvalidationReason() const { return m_bitfields.fullPaintInvalidationReason(); } |
| bool shouldDoFullPaintInvalidation() const { return m_bitfields.fullPaintInvalidationReason() != PaintInvalidationNone; } |
| void setShouldDoFullPaintInvalidation(PaintInvalidationReason = PaintInvalidationFull); |
| @@ -1427,6 +1431,11 @@ private: |
| // It is used to detect layoutObject shifts that forces a full invalidation. |
| // This point does *not* account for composited scrolling. See adjustInvalidationRectForCompositedScrolling(). |
| LayoutPoint m_previousPositionFromPaintInvalidationBacking; |
| + |
| + // Previous paint offset for slimming paint v2. |
| + // TODO(pdr): This should be merged with m_previousPositionFromPaintInvalidationBacking (https://codereview.chromium.org/1315213002). |
| + // DO NOT COMMIT until https://codereview.chromium.org/1315213002 lands. |
| + mutable LayoutPoint m_cachedPaintOffset; |
|
Xianzhu
2015/08/27 17:20:10
Would m_previousPaintOffset be better, as we don't
pdr.
2015/08/28 03:31:41
In the latest patch I've moved the cache to the di
|
| }; |
| // FIXME: remove this once the layout object lifecycle ASSERTS are no longer hit. |