[Libreoffice-commits] core.git: svgio/source

Chr. Rossmanith ChrRossmanith at gmx.de
Tue Mar 17 14:28:02 PDT 2015


 svgio/source/svgreader/svgstyleattributes.cxx |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 48916c9b8c1363a37bf511626326ee6dc150975c
Author: Chr. Rossmanith <ChrRossmanith at gmx.de>
Date:   Mon Mar 16 14:33:54 2015 +0100

    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 at libreoffice.org>
    Reviewed-by: Christina Roßmanith <ChrRossmanith at web.de>

diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx
index 888c8d9..4735887 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);


More information about the Libreoffice-commits mailing list