Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Unified Diff: third_party/WebKit/Source/core/layout/LayoutObject.h

Issue 2751523011: Reland of Add 'WithoutGeometryChange' variants of paint invalidation flag setters (Closed)
Patch Set: Fix Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 f9a49f8c9e2b91e4a48cc38a96257f6438356ad7..79b65ea12f6661095f937a0e57d6fd3205c35ddc 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.h
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.h
@@ -1645,6 +1645,8 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
}
void setShouldDoFullPaintInvalidation(
PaintInvalidationReason = PaintInvalidationFull);
+ void setShouldDoFullPaintInvalidationWithoutGeometryChange(
+ PaintInvalidationReason = PaintInvalidationFull);
void clearShouldDoFullPaintInvalidation() {
m_bitfields.setFullPaintInvalidationReason(PaintInvalidationNone);
}
@@ -1655,12 +1657,17 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
return m_bitfields.mayNeedPaintInvalidation();
}
void setMayNeedPaintInvalidation();
+ void setMayNeedPaintInvalidationWithoutGeometryChange();
bool mayNeedPaintInvalidationSubtree() const {
return m_bitfields.mayNeedPaintInvalidationSubtree();
}
void setMayNeedPaintInvalidationSubtree();
+ bool needsPaintOffsetAndVisualRectUpdate() const {
+ return m_bitfields.needsPaintOffsetAndVisualRectUpdate();
+ }
+
bool mayNeedPaintInvalidationAnimatedBackgroundImage() const {
return m_bitfields.mayNeedPaintInvalidationAnimatedBackgroundImage();
}
@@ -1675,9 +1682,7 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
const PaintInvalidationState&) const;
bool shouldCheckForPaintInvalidation() const {
- return mayNeedPaintInvalidation() || shouldDoFullPaintInvalidation() ||
- shouldInvalidateSelection() ||
- m_bitfields.childShouldCheckForPaintInvalidation();
+ return mayNeedPaintInvalidation() || shouldDoFullPaintInvalidation();
}
virtual LayoutRect viewRect() const;
@@ -2014,7 +2019,8 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
#if DCHECK_IS_ON()
virtual bool paintInvalidationStateIsDirty() const {
return backgroundChangedSinceLastPaintInvalidation() ||
- shouldCheckForPaintInvalidation();
+ shouldCheckForPaintInvalidation() || shouldInvalidateSelection() ||
+ needsPaintOffsetAndVisualRectUpdate();
}
#endif
@@ -2099,6 +2105,7 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
inline void markAncestorsForOverflowRecalcIfNeeded();
inline void markAncestorsForPaintInvalidation();
+ inline void setNeedsPaintOffsetAndVisualRectUpdate();
inline void invalidateContainerPreferredLogicalWidths();
@@ -2195,10 +2202,10 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
m_selfNeedsOverflowRecalcAfterStyleChange(false),
m_childNeedsOverflowRecalcAfterStyleChange(false),
m_preferredLogicalWidthsDirty(false),
- m_childShouldCheckForPaintInvalidation(false),
m_mayNeedPaintInvalidation(false),
m_mayNeedPaintInvalidationSubtree(false),
m_mayNeedPaintInvalidationAnimatedBackgroundImage(false),
+ m_needsPaintOffsetAndVisualRectUpdate(false),
m_shouldInvalidateSelection(false),
m_floating(false),
m_isAnonymous(!node),
@@ -2297,13 +2304,13 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
ADD_BOOLEAN_BITFIELD(preferredLogicalWidthsDirty,
PreferredLogicalWidthsDirty);
- ADD_BOOLEAN_BITFIELD(childShouldCheckForPaintInvalidation,
- ChildShouldCheckForPaintInvalidation);
ADD_BOOLEAN_BITFIELD(mayNeedPaintInvalidation, MayNeedPaintInvalidation);
ADD_BOOLEAN_BITFIELD(mayNeedPaintInvalidationSubtree,
MayNeedPaintInvalidationSubtree);
ADD_BOOLEAN_BITFIELD(mayNeedPaintInvalidationAnimatedBackgroundImage,
MayNeedPaintInvalidationAnimatedBackgroundImage);
+ ADD_BOOLEAN_BITFIELD(needsPaintOffsetAndVisualRectUpdate,
+ NeedsPaintOffsetAndVisualRectUpdate);
ADD_BOOLEAN_BITFIELD(shouldInvalidateSelection, ShouldInvalidateSelection);
// This boolean is the cached value of 'float'
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698