summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-08-14 13:09:36 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-08-14 21:24:44 +0200
commitd72a9f930215b10f6f45a767b0515dcc8ad2b793 (patch)
treef30fdf6d051f28168cbece595e2f75c48662533d
parentf9c85a92fae87c4c6d12bb1eab091ceb24cf8ca6 (diff)
tdf#124700 don't pull from or insert into cache for PixelSnapHairline
Change-Id: I7ca0f556164b6bc462cee3c5532733dbd6b68a2b Reviewed-on: https://gerrit.libreoffice.org/77456 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Tested-by: Jenkins
-rw-r--r--vcl/headless/svpgdi.cxx16
-rw-r--r--vcl/win/gdi/gdiimpl.cxx14
2 files changed, 19 insertions, 11 deletions
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index 26fe0651d7d3..467de73597e6 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -1282,7 +1282,8 @@ bool SvpSalGraphics::drawPolyLine(
// check data validity
if(nullptr == pSystemDependentData_CairoPath->getCairoPath()
|| pSystemDependentData_CairoPath->getNoJoin() != bNoJoin
- || pSystemDependentData_CairoPath->getAntiAliasB2DDraw() != bAntiAliasB2DDraw)
+ || pSystemDependentData_CairoPath->getAntiAliasB2DDraw() != bAntiAliasB2DDraw
+ || bPixelSnapHairline /*tdf#124700*/ )
{
// data invalid, forget
pSystemDependentData_CairoPath.reset();
@@ -1337,11 +1338,14 @@ bool SvpSalGraphics::drawPolyLine(
}
// copy and add to buffering mechanism
- pSystemDependentData_CairoPath = rPolyLine.addOrReplaceSystemDependentData<SystemDependentData_CairoPath>(
- ImplGetSystemDependentDataManager(),
- cairo_copy_path(cr),
- bNoJoin,
- bAntiAliasB2DDraw);
+ if (!bPixelSnapHairline /*tdf#124700*/)
+ {
+ pSystemDependentData_CairoPath = rPolyLine.addOrReplaceSystemDependentData<SystemDependentData_CairoPath>(
+ ImplGetSystemDependentDataManager(),
+ cairo_copy_path(cr),
+ bNoJoin,
+ bAntiAliasB2DDraw);
+ }
}
// extract extents
diff --git a/vcl/win/gdi/gdiimpl.cxx b/vcl/win/gdi/gdiimpl.cxx
index 10efebc5cf47..e62d30a1fabe 100644
--- a/vcl/win/gdi/gdiimpl.cxx
+++ b/vcl/win/gdi/gdiimpl.cxx
@@ -2286,7 +2286,8 @@ bool WinSalGraphicsImpl::drawPolyLine(
if(pSystemDependentData_GraphicsPath)
{
// check data validity
- if(pSystemDependentData_GraphicsPath->getNoLineJoin() != bNoLineJoin)
+ if (pSystemDependentData_GraphicsPath->getNoLineJoin() != bNoLineJoin
+ || bPixelSnapHairline /*tdf#124700*/)
{
// data invalid, forget
pSystemDependentData_GraphicsPath.reset();
@@ -2317,10 +2318,13 @@ bool WinSalGraphicsImpl::drawPolyLine(
}
// add to buffering mechanism
- rPolygon.addOrReplaceSystemDependentData<SystemDependentData_GraphicsPath>(
- ImplGetSystemDependentDataManager(),
- pGraphicsPath,
- bNoLineJoin);
+ if (!bPixelSnapHairline /*tdf#124700*/)
+ {
+ rPolygon.addOrReplaceSystemDependentData<SystemDependentData_GraphicsPath>(
+ ImplGetSystemDependentDataManager(),
+ pGraphicsPath,
+ bNoLineJoin);
+ }
}
if(mrParent.getAntiAliasB2DDraw())