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

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

Issue 2489893002: [SPv2] Track paint offset change (Closed)
Patch Set: - Created 4 years, 1 month 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 a659ba9175ce51d228f2ce460454b97dd2e5b522..20fe15d99f4d88a46d48f8b98f3abcdd612b9dfe 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.h
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.h
@@ -1584,6 +1584,10 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
// Called when the previous visual rect(s) is no longer valid.
virtual void clearPreviousVisualRects();
+ const LayoutPoint& previousPaintOffset() const {
+ return m_previousPaintOffset;
+ }
+
// Only adjusts if the paint invalidation container is not a composited
// scroller.
void adjustPreviousPaintInvalidationForScrollIfNeeded(
@@ -1679,6 +1683,10 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
void setPreviousVisualRect(const LayoutRect& r) {
m_layoutObject.setPreviousVisualRect(r);
}
+ void setPreviousPaintOffset(const LayoutPoint& p) {
+ DCHECK(RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled());
+ m_layoutObject.m_previousPaintOffset = p;
+ }
void setHasPreviousLocationInBacking(bool b) {
m_layoutObject.m_bitfields.setHasPreviousLocationInBacking(b);
}
@@ -2343,10 +2351,17 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
// Store state between styleWillChange and styleDidChange
static bool s_affectsParentBlock;
- // This stores the visual rect from the previous frame. This rect does *not*
- // account for composited scrolling. See
+ // This stores the visual rect computed by the latest paint invalidation.
+ // This rect does *not* account for composited scrolling. See
// adjustVisualRectForCompositedScrolling().
LayoutRect m_previousVisualRect;
+
+ // This stores the paint offset computed by the latest paint property tree
+ // building. It is relative to the containing transform space. It is the same
+ // offset that will be used to paint the object on SPv2. It's used to detect
+ // paint offset change for paint invalidation on SPv2, and partial paint
+ // property tree update for SlimmingPaintInvalidation on SPv1 and SPv2.
+ LayoutPoint m_previousPaintOffset;
};
// FIXME: remove this once the layout object lifecycle ASSERTS are no longer

Powered by Google App Engine
This is Rietveld 408576698