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>
This commit is contained in:
Chr. Rossmanith
2015-03-16 14:33:54 +01:00
committed by Christina Roßmanith
parent 413f7c3642
commit 48916c9b8c

View File

@@ -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);