diff options
author | Caolán McNamara <caolanm@redhat.com> | 2023-04-21 20:22:12 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2023-04-26 13:06:28 +0200 |
commit | 3c453c9123d5cd1e3532edcd052864fdd4ce196a (patch) | |
tree | 8c891207716c7269c705093151619031a65ea1e2 | |
parent | tdf#137542 don't crash at least (diff) | |
download | core-3c453c9123d5cd1e3532edcd052864fdd4ce196a.tar.gz core-3c453c9123d5cd1e3532edcd052864fdd4ce196a.zip |
tdf#154957 Revert "use OutputDevice clipping if its just a set of rectangles"
it was an attempt at an optimization, but if it doesn't work just revert it.
The non-antialias case also doesn't work so the reverted commit
wasn't itself the problem but the existing path has some flaw I'm not
going to invest in figuring out.
This reverts commit ee0d5e7bb8614c50e71dd074b8440f412eb62ff3.
Change-Id: I8d4f126e3bfe135d39a085f28cea6708ae8f833f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150777
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
(cherry picked from commit d6524618521b82187f07a77cbc463d3b89de1ec5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150792
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r-- | drawinglayer/source/processor2d/vclprocessor2d.cxx | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx index f13b7c4aadb2..393c4c64d8e8 100644 --- a/drawinglayer/source/processor2d/vclprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx @@ -831,17 +831,6 @@ void VclProcessor2D::RenderPolyPolygonGraphicPrimitive2D( } } -namespace -{ -bool isRectangles(const basegfx::B2DPolyPolygon& rPolyPoly) -{ - for (sal_uInt32 i = 0, nCount = rPolyPoly.count(); i < nCount; ++i) - if (!basegfx::utils::isRectangle(rPolyPoly.getB2DPolygon(i))) - return false; - return true; -} -} - // mask group void VclProcessor2D::RenderMaskPrimitive2DPixel(const primitive2d::MaskPrimitive2D& rMaskCandidate) { @@ -856,7 +845,7 @@ void VclProcessor2D::RenderMaskPrimitive2DPixel(const primitive2d::MaskPrimitive aMask.transform(maCurrentTransformation); // Unless smooth edges are needed, simply use clipping. - if (isRectangles(aMask) || !getViewInformation2D().getUseAntiAliasing()) + if (basegfx::utils::isRectangle(aMask) || !getViewInformation2D().getUseAntiAliasing()) { mpOutputDevice->Push(vcl::PushFlags::CLIPREGION); mpOutputDevice->IntersectClipRegion(vcl::Region(aMask)); |