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 55bc604d5846fbe7b08cabc01c8ebf4041a077f9..d22f6d42bd75b3e8de00b81773ea4e77be0607c4 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutObject.h |
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.h |
@@ -1598,6 +1598,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 { |
pdr.
2016/10/26 05:25:12
I wonder if "*ExpandedForSnapping" would be more d
Xianzhu
2016/10/26 18:32:31
In next steps, the field will be also used for tra
|
+ return m_bitfields.previousPaintInvalidationRectCoversExtraPixels(); |
+ } |
+ |
// Called when the previous paint invalidation rect(s) is no longer valid. |
virtual void clearPreviousPaintInvalidationRects(); |
@@ -1704,8 +1710,11 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver, |
m_layoutObject.ensureIsReadyForPaintInvalidation(); |
} |
- void setPreviousPaintInvalidationRect(const LayoutRect& r) { |
+ void setPreviousPaintInvalidationRect(const LayoutRect& r, |
+ bool coversExtraPixels) { |
m_layoutObject.setPreviousPaintInvalidationRect(r); |
+ m_layoutObject.m_bitfields |
+ .setPreviousPaintInvalidationRectCoversExtraPixels(coversExtraPixels); |
} |
void setPreviousPositionFromPaintInvalidationBacking(const LayoutPoint& p) { |
m_layoutObject.setPreviousPositionFromPaintInvalidationBacking(p); |
@@ -2092,6 +2101,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), |
@@ -2123,7 +2133,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 |
@@ -2191,6 +2201,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); |