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

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

Issue 1287413002: Fix paint invalidation rect tracking within composited scrolling layers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
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 | « Source/core/layout/LayoutBoxModelObject.cpp ('k') | Source/core/layout/LayoutObject.cpp » ('j') | no next file with comments »
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 9fc2fe574a5fd63d784adf0d6778ad6100e18d7e..664972db44458dbf1ea5aed3de27ae1833c31be8 100644
--- a/Source/core/layout/LayoutObject.h
+++ b/Source/core/layout/LayoutObject.h
@@ -997,10 +997,14 @@ public:
bool isRelayoutBoundaryForInspector() const;
- // The previous paint invalidation rect in the object's previous paint backing.
- const LayoutRect& previousPaintInvalidationRect() const { return m_previousPaintInvalidationRect; }
+ // The previous paint invalidation rect, in the the space of the paint invalidation container (*not* the graphics layer that paints
+ // this object).
+ LayoutRect previousPaintInvalidationRectIncludingCompositedScrolling(const LayoutBoxModelObject& paintInvalidationContainer) const;
void setPreviousPaintInvalidationRect(const LayoutRect& rect) { m_previousPaintInvalidationRect = rect; }
+ // Only adjusts if the paint invalidation container is not a composited scroller.
+ void adjustPreviousPaintInvalidationForScrollIfNeeded(const DoubleSize& scrollDelta);
+
// The previous position of the top-left corner of the object in its previous paint backing.
const LayoutPoint& previousPositionFromPaintInvalidationBacking() const { return m_previousPositionFromPaintInvalidationBacking; }
void setPreviousPositionFromPaintInvalidationBacking(const LayoutPoint& positionFromPaintInvalidationBacking) { m_previousPositionFromPaintInvalidationBacking = positionFromPaintInvalidationBacking; }
@@ -1190,6 +1194,13 @@ protected:
void setIsSlowRepaintObject(bool);
private:
+ const LayoutRect& previousPaintInvalidationRect() const { return m_previousPaintInvalidationRect; }
+
+ // Adjusts a paint invalidation rect in the space of |m_previousPaintInvalidationRect| and |m_previousPositionFromPaintInvalidationBacking|
+ // to be in the space of the |paintInvalidationContainer|,
+ // if needed. They can be different only if |paintInvalidationContainer| is a composited scroller.
+ void adjustInvalidationRectForCompositedScrolling(LayoutRect&, const LayoutBoxModelObject& paintInvalidationContainer) const;
+
void clearLayoutRootIfNeeded() const;
bool isInert() const;
@@ -1426,11 +1437,13 @@ private:
// Store state between styleWillChange and styleDidChange
static bool s_affectsParentBlock;
- // This stores the paint invalidation rect from the previous frame.
+ // This stores the paint invalidation rect from the previous frame. This rect does *not* account for composited scrolling. See
+ // adjustInvalidationRectForCompositedScrolling().
LayoutRect m_previousPaintInvalidationRect;
// This stores the position in the paint invalidation backing's coordinate.
// 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;
};
« no previous file with comments | « Source/core/layout/LayoutBoxModelObject.cpp ('k') | Source/core/layout/LayoutObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698