| 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 5be3d0db2781b113becb8e6ad2e003ad48b1ca3a..b586c5449eaa7c98c88a1120ccbb146fefc1afdc 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutObject.h
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutObject.h
|
| @@ -1138,6 +1138,17 @@ public:
|
| m_previousPositionFromPaintInvalidationBacking = positionFromPaintInvalidationBacking;
|
| }
|
|
|
| + const bool paintOffsetChanged(const LayoutPoint& newPaintOffset) const
|
| + {
|
| + ASSERT(RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled());
|
| + return m_previousPositionFromPaintInvalidationBacking != uninitializedPaintOffset() && m_previousPositionFromPaintInvalidationBacking != newPaintOffset;
|
| + }
|
| + void setPreviousPaintOffset(const LayoutPoint& paintOffset) const
|
| + {
|
| + ASSERT(RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled());
|
| + m_previousPositionFromPaintInvalidationBacking = paintOffset;
|
| + }
|
| +
|
| PaintInvalidationReason fullPaintInvalidationReason() const { return m_bitfields.fullPaintInvalidationReason(); }
|
| bool shouldDoFullPaintInvalidation() const { return m_bitfields.fullPaintInvalidationReason() != PaintInvalidationNone; }
|
| void setShouldDoFullPaintInvalidation(PaintInvalidationReason = PaintInvalidationFull);
|
| @@ -1396,6 +1407,8 @@ private:
|
|
|
| const LayoutBoxModelObject* invalidatePaintRectangleInternal(const LayoutRect&) const;
|
|
|
| + static LayoutPoint uninitializedPaintOffset() { return LayoutPoint(LayoutUnit::max(), LayoutUnit::max()); }
|
| +
|
| RefPtr<ComputedStyle> m_style;
|
|
|
| // Oilpan: raw pointer back to the owning Node is considered safe.
|
| @@ -1641,7 +1654,10 @@ private:
|
| // This stores the position in the paint invalidation backing's coordinate.
|
| // 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;
|
| + // For slimmingPaintOffsetCaching, this stores the previous paint offset.
|
| + // TODO(wangxianzhu): Rename this to m_previousPaintOffset when we enable slimmingPaintOffsetCaching.
|
| + // TODO(wangxianzhu): Better mutation control for painting.
|
| + mutable LayoutPoint m_previousPositionFromPaintInvalidationBacking;
|
| };
|
|
|
| // FIXME: remove this once the layout object lifecycle ASSERTS are no longer hit.
|
|
|