summaryrefslogtreecommitdiff
path: root/svgio
diff options
context:
space:
mode:
authorChr. Rossmanith <ChrRossmanith@gmx.de>2015-03-16 14:33:54 +0100
committerChristina Roßmanith <ChrRossmanith@web.de>2015-03-17 21:26:11 +0000
commit48916c9b8c1363a37bf511626326ee6dc150975c (patch)
tree3296bd586ad871395bd34436e0d10b83656911a8 /svgio
parent413f7c3642a6a237848e2c6d3b279bdf4d808c31 (diff)
tdf#89119: SVG - accelerated import of huge paths without fill
the sample attached to the bug can be rendered within seconds instead of minutes Change-Id: I64671e9619f78931da2c11461a6884f2a1c8d66f Reviewed-on: https://gerrit.libreoffice.org/14883 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Christina Roßmanith <ChrRossmanith@web.de>
Diffstat (limited to 'svgio')
-rw-r--r--svgio/source/svgreader/svgstyleattributes.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx
index 888c8d99c46f..4735887e4171 100644
--- a/svgio/source/svgreader/svgstyleattributes.cxx
+++ b/svgio/source/svgreader/svgstyleattributes.cxx
@@ -1088,8 +1088,12 @@ namespace svgio
if(bClipPathIsNonzero || bFillRuleIsNonzero)
{
- // nonzero is wanted, solve geometrically (see description on basegfx)
- aPath = basegfx::tools::createNonzeroConform(aPath);
+ if(getFill() || getSvgGradientNodeFill() || getSvgPatternNodeFill()) {
+ // nonzero is wanted, solve geometrically (see description on basegfx)
+ // basegfx::tools::createNonzeroConform() is expensive for huge paths
+ // and is only needed if path will be filled later on
+ aPath = basegfx::tools::createNonzeroConform(aPath);
+ }
}
add_fill(aPath, rTarget, aGeoRange);