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

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

Issue 1315993004: Implement a paint offset cache for slimming paint v2 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « no previous file | Source/core/layout/LayoutObject.cpp » ('j') | Source/core/paint/BlockFlowPainter.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutObject.h
diff --git a/Source/core/layout/LayoutObject.h b/Source/core/layout/LayoutObject.h
index 06e8d0270fba1af8f836169364b4e2f30ebf0d3b..059f11ca016054bb40673ea5d065996180ac2b58 100644
--- a/Source/core/layout/LayoutObject.h
+++ b/Source/core/layout/LayoutObject.h
@@ -1009,6 +1009,10 @@ public:
const LayoutPoint& previousPositionFromPaintInvalidationBacking() const { return m_previousPositionFromPaintInvalidationBacking; }
void setPreviousPositionFromPaintInvalidationBacking(const LayoutPoint& positionFromPaintInvalidationBacking) { m_previousPositionFromPaintInvalidationBacking = positionFromPaintInvalidationBacking; }
+ // Cache of the previous paint offset for slimming paint v2.
+ const LayoutPoint& cachedPaintOffset() const;
+ void updateCachedPaintOffset(const LayoutPoint&) const;
+
PaintInvalidationReason fullPaintInvalidationReason() const { return m_bitfields.fullPaintInvalidationReason(); }
bool shouldDoFullPaintInvalidation() const { return m_bitfields.fullPaintInvalidationReason() != PaintInvalidationNone; }
void setShouldDoFullPaintInvalidation(PaintInvalidationReason = PaintInvalidationFull);
@@ -1427,6 +1431,11 @@ private:
// It is used to detect layoutObject shifts that forces a full invalidation.
// This point does *not* account for composited scrolling. See adjustInvalidationRectForCompositedScrolling().
LayoutPoint m_previousPositionFromPaintInvalidationBacking;
+
+ // Previous paint offset for slimming paint v2.
+ // TODO(pdr): This should be merged with m_previousPositionFromPaintInvalidationBacking (https://codereview.chromium.org/1315213002).
+ // DO NOT COMMIT until https://codereview.chromium.org/1315213002 lands.
+ mutable LayoutPoint m_cachedPaintOffset;
Xianzhu 2015/08/27 17:20:10 Would m_previousPaintOffset be better, as we don't
pdr. 2015/08/28 03:31:41 In the latest patch I've moved the cache to the di
};
// FIXME: remove this once the layout object lifecycle ASSERTS are no longer hit.
« no previous file with comments | « no previous file | Source/core/layout/LayoutObject.cpp » ('j') | Source/core/paint/BlockFlowPainter.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698