tdf#101181: disable antialiasing for mask

Since we need objects' bounds here, antialiasing them would make the
resulting non-fully-transparent areas thicker, thus making the effect
also thicker. Disable it here; also slightly increases performance.

We can't do that for soft edge: the effect draws all its children as
bitmap, so disabling AA would make all children areas unaffected by
soft edge to have worse image quality.

Change-Id: Ifc9a60ec7894bfe9d0209e04532c9ca0a1eb3867
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95096
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
index d4ee5f3..8d217dc 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
@@ -989,6 +989,9 @@ void VclPixelProcessor2D::processGlowPrimitive2D(const primitive2d::GlowPrimitiv
        // remember last OutDev and set to content
        OutputDevice* pLastOutputDevice = mpOutputDevice;
        mpOutputDevice = &aBufferDevice.getContent();
        // We don't need antialiased mask here, which would only make effect thicker
        const auto aPrevAA = mpOutputDevice->GetAntialiasing();
        mpOutputDevice->SetAntialiasing(AntialiasingFlags::NONE);
        mpOutputDevice->Erase();
        process(rCandidate);
        const tools::Rectangle aRect(static_cast<long>(std::floor(aRange.getMinX())),
@@ -996,6 +999,7 @@ void VclPixelProcessor2D::processGlowPrimitive2D(const primitive2d::GlowPrimitiv
                                     static_cast<long>(std::ceil(aRange.getMaxX())),
                                     static_cast<long>(std::ceil(aRange.getMaxY())));
        BitmapEx bmpEx = mpOutputDevice->GetBitmapEx(aRect.TopLeft(), aRect.GetSize());
        mpOutputDevice->SetAntialiasing(aPrevAA);

        AlphaMask mask
            = ProcessAndBlurAlphaMask(bmpEx.GetAlpha(), fBlurRadius, fBlurRadius, nTransparency);
@@ -1033,6 +1037,8 @@ void VclPixelProcessor2D::processSoftEdgePrimitive2D(
        OutputDevice* pLastOutputDevice = mpOutputDevice;
        mpOutputDevice = &aBufferDevice.getContent();
        mpOutputDevice->Erase();
        // Since the effect converts all children to bitmap, we can't disable antialiasing here,
        // because it would result in poor quality in areas not affected by the effect
        process(rCandidate);

        const tools::Rectangle aRect(static_cast<long>(std::floor(aRange.getMinX())),