| Index: third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
|
| diff --git a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
|
| index 86176fa7819076bb8bebf5db97cc9b96570ad85a..6e5c18b8e4ecaa8a0de904a10e5ea07a235ce7d1 100644
|
| --- a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
|
| @@ -235,11 +235,13 @@ static bool shouldRepaintSubsequence(PaintLayer& paintLayer, const PaintLayerPai
|
| needsRepaint = true;
|
|
|
| // Repaint if layer's clip changes.
|
| - ClipRects& clipRects = paintLayer.clipper().paintingClipRects(paintingInfo.rootLayer, respectOverflowClip, subpixelAccumulation);
|
| - ClipRects* previousClipRects = paintLayer.previousPaintingClipRects();
|
| - if (!needsRepaint && &clipRects != previousClipRects && (!previousClipRects || clipRects != *previousClipRects))
|
| - needsRepaint = true;
|
| - paintLayer.setPreviousPaintingClipRects(clipRects);
|
| + if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
|
| + ClipRects& clipRects = paintLayer.clipper().paintingClipRects(paintingInfo.rootLayer, respectOverflowClip, subpixelAccumulation);
|
| + ClipRects* previousClipRects = paintLayer.previousPaintingClipRects();
|
| + if (!needsRepaint && &clipRects != previousClipRects && (!previousClipRects || clipRects != *previousClipRects))
|
| + needsRepaint = true;
|
| + paintLayer.setPreviousPaintingClipRects(clipRects);
|
| + }
|
|
|
| // Repaint if previously the layer might be clipped by paintDirtyRect and paintDirtyRect changes.
|
| if (!needsRepaint && paintLayer.previousPaintResult() == PaintLayerPainter::MayBeClippedByPaintDirtyRect && paintLayer.previousPaintDirtyRect() != paintingInfo.paintDirtyRect)
|
| @@ -345,15 +347,6 @@ PaintLayerPainter::PaintResult PaintLayerPainter::paintLayerContents(GraphicsCon
|
| else
|
| m_paintLayer.collectFragments(layerFragments, localPaintingInfo.rootLayer, localPaintingInfo.paintDirtyRect, cacheSlot, IgnoreOverlayScrollbarSize, respectOverflowClip, &offsetFromRoot, localPaintingInfo.subPixelAccumulation);
|
|
|
| - // TODO(trchen): Needs to adjust cull rect between transform spaces. https://crbug.com/593596
|
| - // Disables layer culling for SPv2 for now because the space of the cull rect doesn't match
|
| - // the space we paint in. Clipping will still be done by clip nodes, so this won't cause
|
| - // rendering issues, only performance.
|
| - if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
|
| - layerFragments[0].backgroundRect = LayoutRect(LayoutRect::infiniteIntRect());
|
| - layerFragments[0].foregroundRect = LayoutRect(LayoutRect::infiniteIntRect());
|
| - }
|
| -
|
| if (shouldPaintContent) {
|
| // TODO(wangxianzhu): This is for old slow scrolling. Implement similar optimization for slimming paint v2.
|
| shouldPaintContent = atLeastOneFragmentIntersectsDamageRect(layerFragments, localPaintingInfo, paintFlags, offsetFromRoot);
|
|
|