drawinglayer/source/tools/emfphelperdata.cxx |    6 +++---
 drawinglayer/source/tools/emfphelperdata.hxx |    4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 6f609433730ecdbc23096b9362df596a0b703d37
Author: Bartosz Kosiorek <gan...@poczta.onet.pl>
Date:   Fri Dec 1 23:11:45 2017 +0100

    tdf#109340 Improve performance by reducing matrix multiplication
    
    Multiplication of two B2DHomMatrix with operator* is very CPU expensive,
    because 24 of double-precision floating point multiplication
    needs to be performed.
    
    With this patch I have reduced Multiplication of matrix,
    by creating combined Scale and Transform matrix at once.
    It allows to reduce matrix multiplication by one,
    and improve import time.
    
    Change-Id: I85fde6354e458659a0214514c6e05b8e2ee04185
    Reviewed-on: https://gerrit.libreoffice.org/45828
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Patrick Jaap <patrick.j...@tu-dresden.de>
    Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>

diff --git a/drawinglayer/source/tools/emfphelperdata.cxx 
b/drawinglayer/source/tools/emfphelperdata.cxx
index bd1f9e9b071a..a5dda5d2ad96 100644
--- a/drawinglayer/source/tools/emfphelperdata.cxx
+++ b/drawinglayer/source/tools/emfphelperdata.cxx
@@ -283,8 +283,8 @@ namespace emfplushelper
         // To evtl. correct and see where this came from, please compare with 
the implementations
         // of EmfPlusHelperData::MapToDevice and EmfPlusHelperData::Map* in 
prev versions
         maMapTransform = maWorldTransform;
-        maMapTransform *= basegfx::utils::createScaleB2DHomMatrix(100.0 * 
mnMmX / mnPixX, 100.0 * mnMmY / mnPixY);
-        maMapTransform *= 
basegfx::utils::createTranslateB2DHomMatrix(double(-mnFrameLeft), 
double(-mnFrameTop));
+        maMapTransform *= 
basegfx::utils::createScaleTranslateB2DHomMatrix(100.0 * mnMmX / mnPixX, 100.0 
* mnMmY / mnPixY,
+                                                                           
double(-mnFrameLeft), double(-mnFrameTop));
         maMapTransform *= maBaseTransform;
     }
 
@@ -812,7 +812,7 @@ namespace emfplushelper
                     {
                         sal_uInt32 header, version;
 
-                        
rMS.ReadUInt32(header).ReadUInt32(version).ReadInt32(mnHDPI).ReadInt32(mnVDPI);
+                        
rMS.ReadUInt32(header).ReadUInt32(version).ReadUInt32(mnHDPI).ReadUInt32(mnVDPI);
                         SAL_INFO("drawinglayer", "EMF+ Header");
                         SAL_INFO("drawinglayer", "EMF+\theader: 0x" << 
std::hex << header << " version: " << std::dec << version << " horizontal DPI: 
" << mnHDPI << " vertical DPI: " << mnVDPI << " dual: " << (flags & 1));
                         break;
diff --git a/drawinglayer/source/tools/emfphelperdata.hxx 
b/drawinglayer/source/tools/emfphelperdata.hxx
index 431e9b0a5c72..729835307633 100644
--- a/drawinglayer/source/tools/emfphelperdata.hxx
+++ b/drawinglayer/source/tools/emfphelperdata.hxx
@@ -198,8 +198,8 @@ namespace emfplushelper
         float                       mfPageScale;
         sal_Int32                   mnOriginX;
         sal_Int32                   mnOriginY;
-        sal_Int32                   mnHDPI;
-        sal_Int32                   mnVDPI;
+        sal_uInt32                  mnHDPI;
+        sal_uInt32                  mnVDPI;
 
         /* EMF+ emf header info */
         sal_Int32                   mnFrameLeft;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to