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

Unified Diff: third_party/WebKit/Source/core/paint/PaintInvalidator.cpp

Issue 2489893002: [SPv2] 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.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp b/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
index 7145cd021f04537b6e4252f12e2a21a94ae671b9..c274849beca90b56a0704b274f99e9f5b4e5f015 100644
--- a/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
@@ -332,6 +332,8 @@ void PaintInvalidator::updateContext(const LayoutObject& object,
context.oldLocation = objectPaintInvalidator.previousLocationInBacking();
context.newVisualRect = computeVisualRectInBacking(object, context);
context.newLocation = computeLocationInBacking(object, context);
+ context.oldPaintOffset = object.previousPaintOffset();
+ context.newPaintOffset = context.treeBuilderContext.current.paintOffset;
IntSize adjustment = object.scrollAdjustmentForPaintInvalidation(
*context.paintInvalidationContainer);
@@ -340,6 +342,7 @@ void PaintInvalidator::updateContext(const LayoutObject& object,
object.getMutableForPainting().setPreviousVisualRect(context.newVisualRect);
objectPaintInvalidator.setPreviousLocationInBacking(context.newLocation);
+ object.getMutableForPainting().setPreviousPaintOffset(context.newPaintOffset);
}
void PaintInvalidator::invalidatePaintIfNeeded(
@@ -418,9 +421,12 @@ void PaintInvalidator::invalidatePaintIfNeeded(
break;
}
- if (context.oldLocation != context.newLocation)
+ if (context.oldLocation != context.newLocation ||
+ (RuntimeEnabledFeatures::slimmingPaintV2Enabled() &&
+ context.oldPaintOffset != context.newPaintOffset)) {
context.forcedSubtreeInvalidationFlags |=
PaintInvalidatorContext::ForcedSubtreeInvalidationChecking;
+ }
// TODO(crbug.com/490725): This is a workaround for the bug, to force
// descendant to update visual rects on clipping change.
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintInvalidator.h ('k') | third_party/WebKit/Source/core/paint/PartPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698