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

Unified Diff: third_party/WebKit/Source/core/paint/PaintInvalidator.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
Index: third_party/WebKit/Source/core/paint/PaintInvalidator.h
diff --git a/third_party/WebKit/Source/core/paint/PaintInvalidator.h b/third_party/WebKit/Source/core/paint/PaintInvalidator.h
index 7813bdb83e2c72849a4ecd4420f15412f1f795c9..dea766bb8bf8c414e28d73b94841396c7a8624f8 100644
--- a/third_party/WebKit/Source/core/paint/PaintInvalidator.h
+++ b/third_party/WebKit/Source/core/paint/PaintInvalidator.h
@@ -31,7 +31,12 @@ struct PaintInvalidatorContext {
paintInvalidationContainer(parentContext.paintInvalidationContainer),
paintInvalidationContainerForStackedContents(
parentContext.paintInvalidationContainerForStackedContents),
- paintingLayer(parentContext.paintingLayer) {}
+ paintingLayer(parentContext.paintingLayer),
+ shouldAdjustPaintOffsetToContainer(
+ parentContext.shouldAdjustPaintOffsetToContainer),
+ shouldAdjustPaintOffsetToContainerForStackedContents(
+ parentContext
+ .shouldAdjustPaintOffsetToContainerForStackedContents) {}
// This method is temporary to adapt PaintInvalidatorContext and the legacy
// PaintInvalidationState for code shared by old code and new code.
@@ -69,7 +74,7 @@ struct PaintInvalidatorContext {
PaintLayer* paintingLayer = nullptr;
- // Store the new and old visual rects in the paint invalidation backing's
+ // Store the old and new visual rects in the paint invalidation backing's
// coordinates. The rects do *not* account for composited scrolling.
// See LayoutObject::adjustVisualRectForCompositedScrolling().
LayoutRect oldVisualRect;
@@ -82,6 +87,17 @@ struct PaintInvalidatorContext {
// LayoutObject::adjustVisualRectForCompositedScrolling().
LayoutPoint oldLocation;
LayoutPoint newLocation;
+
+ // Stores the old and new offsets to paint this object, relative to the
+ // containing transform node.
+ LayoutPoint oldPaintOffset;
+ LayoutPoint newPaintOffset;
+
+ // PaintPropertyTreeBuilder computes paint offset relative to the containing
+ // transform node. If the transform node is above paintInvalidationContainer,
+ // we need to adjust paint offset into paintInvalidationContainer space.
+ bool shouldAdjustPaintOffsetToContainer = false;
+ bool shouldAdjustPaintOffsetToContainerForStackedContents = false;
};
class PaintInvalidator {
« no previous file with comments | « third_party/WebKit/Source/core/paint/ObjectPainter.cpp ('k') | third_party/WebKit/Source/core/paint/PaintInvalidator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698