Index: Source/core/paint/BlockPainter.cpp |
diff --git a/Source/core/paint/BlockPainter.cpp b/Source/core/paint/BlockPainter.cpp |
index 7e38f20f45d8223a1dd554ac18c686e4adbddf35..47d7dc99fdcb944b05b8fbd7c508d4ffa9f85c3c 100644 |
--- a/Source/core/paint/BlockPainter.cpp |
+++ b/Source/core/paint/BlockPainter.cpp |
@@ -28,6 +28,15 @@ |
namespace blink { |
+static inline LayoutRect visualOverflowRectWithPaintOffset(const LayoutBlock& layoutBox, const LayoutPoint& paintOffset) |
+{ |
+ if (!RuntimeEnabledFeatures::slimmingPaintEnabled()) |
+ return LayoutRect(); |
+ LayoutRect bounds = layoutBox.visualOverflowRect(); |
+ bounds.moveBy(paintOffset); |
+ return bounds; |
+} |
+ |
void BlockPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& paintOffset) |
{ |
PaintInfo localPaintInfo(paintInfo); |
@@ -43,6 +52,9 @@ void BlockPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& paintOff |
if (!overflowBox.intersects(LayoutRect(localPaintInfo.rect))) |
return; |
+ if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) |
+ m_layoutBlock.invalidatePaintIfNeededForSlimmingPaintV2(adjustedPaintOffset); |
+ |
SubtreeRecorder subtreeRecorder(*paintInfo.context, m_layoutBlock, paintInfo.phase); |
if (subtreeRecorder.canUseCache()) |
return; |
@@ -151,15 +163,6 @@ void BlockPainter::paintAsInlineBlock(LayoutObject& layoutObject, const PaintInf |
} |
} |
-static inline LayoutRect visualOverflowRectWithPaintOffset(const LayoutBlock& layoutBox, const LayoutPoint& paintOffset) |
-{ |
- if (!RuntimeEnabledFeatures::slimmingPaintEnabled()) |
- return LayoutRect(); |
- LayoutRect bounds = layoutBox.visualOverflowRect(); |
- bounds.moveBy(paintOffset); |
- return bounds; |
-} |
- |
void BlockPainter::paintObject(const PaintInfo& paintInfo, const LayoutPoint& paintOffset) |
{ |
const PaintPhase paintPhase = paintInfo.phase; |