summaryrefslogtreecommitdiff
path: root/vcl/inc/svdata.hxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-02-06 13:46:24 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-02-07 11:31:16 +0100
commit9f3926df5c2828ad3e8cfce2b4444b1c84352cf4 (patch)
tree35507a2844046b794076c4ae00c4f4b012b87e42 /vcl/inc/svdata.hxx
parent467324f1071c65f6189e7ea567088918b51d2228 (diff)
tdf#123165 cache recently scaled bitmaps for reuse
dropping the cached scaled bitmap when the bitmap is accesed via BitmapAccessMode::Write for writing Change-Id: Ib6539522944838238bd699ec3531039d21dc0f8b Reviewed-on: https://gerrit.libreoffice.org/67459 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/inc/svdata.hxx')
-rw-r--r--vcl/inc/svdata.hxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index ea48d774ccca..08c1e5a66d77 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -22,6 +22,7 @@
#include <config_version.h>
+#include <o3tl/lru_map.hxx>
#include <tools/fldunit.hxx>
#include <unotools/options.hxx>
#include <vcl/bitmapex.hxx>
@@ -194,6 +195,7 @@ struct ImplSVGDIData
std::unique_ptr<ImplPrnQueueList> mpPrinterQueueList; // List of all printer queue
std::shared_ptr<PhysicalFontCollection> mxScreenFontList; // Screen-Font-List
std::shared_ptr<ImplFontCache> mxScreenFontCache; // Screen-Font-Cache
+ o3tl::lru_map<SalBitmap*, BitmapEx> maScaleCache = o3tl::lru_map<SalBitmap*, BitmapEx>(10); // Cache for scaled images
ImplDirectFontSubstitution* mpDirectFontSubst = nullptr; // Font-Substitutions defined in Tools->Options->Fonts
GraphicConverter* mpGrfConverter = nullptr; // Converter for graphics
long mnAppFontX = 0; // AppFont X-Numenator for 40/tel Width