| 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 247131c992ee286e3388696ab902b38545ceef4c..eaf87991edca2a39b254205b80f6c2e64d05753c 100644
|
| --- a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
|
| @@ -525,6 +525,8 @@ PaintLayerPainter::PaintResult PaintLayerPainter::paintFragmentByApplyingTransfo
|
| // Now do a paint with the root layer shifted to be us.
|
| PaintLayerPaintingInfo transformedPaintingInfo(&m_paintLayer, LayoutRect(enclosingIntRect(transform.inverse().mapRect(paintingInfo.paintDirtyRect))), paintingInfo.globalPaintFlags(),
|
| adjustedSubPixelAccumulation);
|
| + if (paintingInfo.ancestorHasNonIdentityAndNonTranslateTransform || !transform.isIdentityOrTranslation())
|
| + transformedPaintingInfo.ancestorHasNonIdentityAndNonTranslateTransform = true;
|
| transformedPaintingInfo.ancestorHasClipPathClipping = paintingInfo.ancestorHasClipPathClipping;
|
| return paintLayerContentsAndReflection(context, transformedPaintingInfo, paintFlags, ForceSingleFragment);
|
| }
|
| @@ -664,6 +666,16 @@ void PaintLayerPainter::paintFragmentWithPhase(PaintPhase phase, const PaintLaye
|
| }
|
| PaintInfo paintInfo(context, pixelSnappedIntRect(newCullRect), phase,
|
| paintingInfo.globalPaintFlags(), paintFlags, paintingInfo.rootLayer->layoutObject());
|
| + Optional<PaintInvalidationState> paintInvalidationState;
|
| + if (RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled()) {
|
| + unsigned flags = 0;
|
| + if (clipState == HasClipped || paintingInfo.clipToDirtyRect)
|
| + flags |= PaintInvalidationState::HasClip;
|
| + if (paintingInfo.ancestorHasNonIdentityAndNonTranslateTransform)
|
| + flags |= PaintInvalidationState::HasNonIdentityAndNonTranslateTransform;
|
| + paintInvalidationState.emplace(*paintingInfo.rootLayer->layoutObject(), clipRect.rect(), flags);
|
| + paintInfo.paintInvalidationState = &*paintInvalidationState;
|
| + }
|
|
|
| m_paintLayer.layoutObject()->paint(paintInfo, paintOffset);
|
| }
|
|
|