summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2020-08-14 02:01:05 +0300
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2020-08-20 15:44:51 +0200
commit597a095ecb0cf74c613ec2ee19ec253b9fdf9c0d (patch)
treedbffee58cd7141a29027dda4eddc896a8a3af0d6
parent692b2779c2c927079e656a9fc398d28cc2b08049 (diff)
tdf#134968: don't forget to draw on mpAlphaVDev in fallback case
Change-Id: I6ab8cc8907943c3bb7fd717624ea4ac7c9d4fd5e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100711 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 18fd4437077f1e51ae54cfd1a160866cca015c2d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100692 Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 76b93688505c0ab2b0e1876d5461a36d8ea22414) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100699 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
-rw-r--r--vcl/source/outdev/polygon.cxx24
1 files changed, 12 insertions, 12 deletions
diff --git a/vcl/source/outdev/polygon.cxx b/vcl/source/outdev/polygon.cxx
index 77e0564ba16f..e031fb05990c 100644
--- a/vcl/source/outdev/polygon.cxx
+++ b/vcl/source/outdev/polygon.cxx
@@ -290,6 +290,8 @@ void OutputDevice::ImplDrawPolyPolygonWithB2DPolyPolygon(const basegfx::B2DPolyP
if( mbInitFillColor )
InitFillColor();
+ bool bSuccess(false);
+
if((mnAntialiasing & AntialiasingFlags::EnableB2dDraw) &&
mpGraphics->supportsOperation(OutDevSupportType::B2DDraw) &&
RasterOp::OverPaint == GetRasterOp() &&
@@ -297,7 +299,7 @@ void OutputDevice::ImplDrawPolyPolygonWithB2DPolyPolygon(const basegfx::B2DPolyP
{
const basegfx::B2DHomMatrix aTransform(ImplGetDeviceTransformation());
basegfx::B2DPolyPolygon aB2DPolyPolygon(rB2DPolyPoly);
- bool bSuccess(true);
+ bSuccess = true;
// ensure closed - maybe assert, hinders buffering
if(!aB2DPolyPolygon.isClosed())
@@ -335,20 +337,18 @@ void OutputDevice::ImplDrawPolyPolygonWithB2DPolyPolygon(const basegfx::B2DPolyP
break;
}
}
+ }
- if(bSuccess)
- {
- if (mpAlphaVDev)
- mpAlphaVDev->ImplDrawPolyPolygonWithB2DPolyPolygon(rB2DPolyPoly);
-
- return;
- }
+ if (!bSuccess)
+ {
+ // fallback to old polygon drawing if needed
+ const tools::PolyPolygon aToolsPolyPolygon(rB2DPolyPoly);
+ const tools::PolyPolygon aPixelPolyPolygon = ImplLogicToDevicePixel(aToolsPolyPolygon);
+ ImplDrawPolyPolygon(aPixelPolyPolygon.Count(), aPixelPolyPolygon);
}
- // fallback to old polygon drawing if needed
- const tools::PolyPolygon aToolsPolyPolygon( rB2DPolyPoly );
- const tools::PolyPolygon aPixelPolyPolygon = ImplLogicToDevicePixel( aToolsPolyPolygon );
- ImplDrawPolyPolygon( aPixelPolyPolygon.Count(), aPixelPolyPolygon );
+ if (mpAlphaVDev)
+ mpAlphaVDev->ImplDrawPolyPolygonWithB2DPolyPolygon(rB2DPolyPoly);
}
// #100127# Extracted from OutputDevice::DrawPolyPolygon()