Index: Source/core/layout/LayoutObject.h |
diff --git a/Source/core/layout/LayoutObject.h b/Source/core/layout/LayoutObject.h |
index 5be3d0db2781b113becb8e6ad2e003ad48b1ca3a..771b6b0ea330838fb67585cbe4e1629061030089 100644 |
--- a/Source/core/layout/LayoutObject.h |
+++ b/Source/core/layout/LayoutObject.h |
@@ -1138,6 +1138,17 @@ public: |
m_previousPositionFromPaintInvalidationBacking = positionFromPaintInvalidationBacking; |
} |
+ const LayoutPoint& previousPaintOffset() const |
+ { |
+ ASSERT(RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled()); |
+ return m_previousPaintOffset; |
+ } |
+ void setPreviousPaintOffset(const LayoutPoint& paintOffset) const |
+ { |
+ ASSERT(RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled()); |
+ m_previousPaintOffset = paintOffset; |
+ } |
+ |
PaintInvalidationReason fullPaintInvalidationReason() const { return m_bitfields.fullPaintInvalidationReason(); } |
bool shouldDoFullPaintInvalidation() const { return m_bitfields.fullPaintInvalidationReason() != PaintInvalidationNone; } |
void setShouldDoFullPaintInvalidation(PaintInvalidationReason = PaintInvalidationFull); |
@@ -1638,10 +1649,15 @@ private: |
// adjustInvalidationRectForCompositedScrolling(). |
LayoutRect m_previousPaintInvalidationRect; |
- // 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; |
+ union { |
+ // 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(). |
+ // TODO(wangxianzhu): Remove this when we enable slimmingPaintOffsetCaching. |
+ LayoutPoint m_previousPositionFromPaintInvalidationBacking; |
+ // For slimmingPaintOffsetCaching. |
+ mutable LayoutPoint m_previousPaintOffset; |
pdr.
2015/09/22 22:44:44
Do we need to track the initial state in order to
Xianzhu
2015/09/23 18:43:18
Done. Added uninitializedPaintOffset() for the ini
|
+ }; |
}; |
// FIXME: remove this once the layout object lifecycle ASSERTS are no longer hit. |