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

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

Issue 2614093002: Combine LayoutObject::previousPaintOffset and paintOffset in paint properties (Closed)
Patch Set: - Created 3 years, 11 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 82075ad1ed24a2aa9211a8441f7cc133f7729b22..3134b8cd6188312125fe188109acf6d62e4e9fd5 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.h
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.h
@@ -1575,9 +1575,7 @@ 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;
- }
+ const LayoutPoint& paintOffset() const { return m_paintOffset; }
PaintInvalidationReason fullPaintInvalidationReason() const {
return m_bitfields.fullPaintInvalidationReason();
@@ -1679,9 +1677,9 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
void setPreviousVisualRect(const LayoutRect& r) {
m_layoutObject.setPreviousVisualRect(r);
}
- void setPreviousPaintOffset(const LayoutPoint& p) {
+ void setPaintOffset(const LayoutPoint& p) {
Xianzhu 2017/01/06 17:24:39 Drop "Previous" because we also use paintOffset()
pdr. 2017/01/06 18:27:42 I like these renames. Can you add a comment like
Xianzhu 2017/01/06 19:24:18 Done.
DCHECK(RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled());
- m_layoutObject.m_previousPaintOffset = p;
+ m_layoutObject.m_paintOffset = p;
}
void setHasPreviousLocationInBacking(bool b) {
m_layoutObject.m_bitfields.setHasPreviousLocationInBacking(b);
@@ -2445,7 +2443,7 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
// offset that will be used to paint the object on SPv2. It's used to detect
pdr. 2017/01/06 18:27:42 This comment is a little out of date. Can you upda
Xianzhu 2017/01/06 19:24:18 Can you point out the out of date part? For paint
pdr. 2017/01/06 19:40:01 You're right, this is up to date.
// paint offset change for paint invalidation on SPv2, and partial paint
// property tree update for SlimmingPaintInvalidation on SPv1 and SPv2.
- LayoutPoint m_previousPaintOffset;
+ LayoutPoint m_paintOffset;
// For SPv2 only. The ObjectPaintProperties structure holds references to the
// property tree nodes that are created by the layout object for painting.

Powered by Google App Engine
This is Rietveld 408576698