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

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

Issue 2487273002: [No submit][SPInvalidation] 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..cffb8e2e430fa3d95c0847781a76c44b42c38423 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,9 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
void setPreviousVisualRect(const LayoutRect& r) {
m_layoutObject.setPreviousVisualRect(r);
}
+ void setPreviousPaintOffset(const LayoutPoint& p) {
+ m_layoutObject.m_previousPaintOffset = p;
+ }
void setHasPreviousLocationInBacking(bool b) {
m_layoutObject.m_bitfields.setHasPreviousLocationInBacking(b);
}
@@ -2343,10 +2350,15 @@ 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 same offset that will be used to paint the object,
+ // relative to the containing transform space.
+ LayoutPoint m_previousPaintOffset;
};
// FIXME: remove this once the layout object lifecycle ASSERTS are no longer
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698