summaryrefslogtreecommitdiff
path: root/vcl/source/outdev
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2020-08-14 02:01:05 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2020-08-14 01:57:55 +0200
commit18fd4437077f1e51ae54cfd1a160866cca015c2d (patch)
tree4f4c25174cd4c170a116562a752fb962376ec988 /vcl/source/outdev
parent25fa654300b0d6a558375fe5f5ee87d3f1065f00 (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>
Diffstat (limited to 'vcl/source/outdev')
-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()