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 2c0ffc245410a99701fc65ede21418afc566040b..9f05661ac436179aa082042cbee19a864b101098 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutObject.h |
| +++ b/third_party/WebKit/Source/core/layout/LayoutObject.h |
| @@ -1599,6 +1599,12 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver, |
| return m_previousPaintInvalidationRect; |
| } |
| + // The previous paint invalidation rect may have been expanded to whole pixels |
| + // or be rotated, skewed, etc., so covers more pixels than the object covers. |
| + bool previousPaintInvalidationRectCoversExtraPixels() const { |
| + return m_bitfields.previousPaintInvalidationRectCoversExtraPixels(); |
| + } |
| + |
| // Called when the previous paint invalidation rect(s) is no longer valid. |
| virtual void clearPreviousPaintInvalidationRects(); |
| @@ -1705,8 +1711,11 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver, |
| m_layoutObject.ensureIsReadyForPaintInvalidation(); |
| } |
| - void setPreviousPaintInvalidationRect(const LayoutRect& r) { |
| + void setPreviousPaintInvalidationRect(const LayoutRect& r, |
|
pdr.
2016/10/26 20:59:29
Idea: Could we refactor this to take a PaintInvali
Xianzhu
2016/10/26 21:05:21
I didn't want to include PaintInvalidator.h from L
|
| + bool coversExtraPixels) { |
| m_layoutObject.setPreviousPaintInvalidationRect(r); |
| + m_layoutObject.m_bitfields |
| + .setPreviousPaintInvalidationRectCoversExtraPixels(coversExtraPixels); |
| } |
| void setPreviousPositionFromPaintInvalidationBacking(const LayoutPoint& p) { |
| m_layoutObject.setPreviousPositionFromPaintInvalidationBacking(p); |
| @@ -2093,6 +2102,7 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver, |
| m_mayNeedPaintInvalidationSubtree(false), |
| m_mayNeedPaintInvalidationAnimatedBackgroundImage(false), |
| m_shouldInvalidateSelection(false), |
| + m_previousPaintInvalidationRectCoversExtraPixels(false), |
| m_floating(false), |
| m_isAnonymous(!node), |
| m_isText(false), |
| @@ -2124,7 +2134,7 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver, |
| m_backgroundObscurationState(BackgroundObscurationStatusInvalid), |
| m_fullPaintInvalidationReason(PaintInvalidationNone) {} |
| - // 32 bits have been used in the first word, and 19 in the second. |
| + // 32 bits have been used in the first word, and 20 in the second. |
| // Self needs layout means that this layout object is marked for a full |
| // layout. This is the default layout but it is expensive as it recomputes |
| @@ -2192,6 +2202,9 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver, |
| MayNeedPaintInvalidationAnimatedBackgroundImage); |
| ADD_BOOLEAN_BITFIELD(shouldInvalidateSelection, ShouldInvalidateSelection); |
| + ADD_BOOLEAN_BITFIELD(previousPaintInvalidationRectCoversExtraPixels, |
| + PreviousPaintInvalidationRectCoversExtraPixels); |
| + |
| // This boolean is the cached value of 'float' |
| // (see ComputedStyle::isFloating). |
| ADD_BOOLEAN_BITFIELD(floating, Floating); |