diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2020-12-30 17:13:35 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2021-01-20 09:06:23 +0100 |
commit | c36cef138a840af013cf85d33ea3d3d27aeb001a (patch) | |
tree | 900cae430b5e000add7278285540effdba14dc22 /vcl/inc/graphic | |
parent | bca1b74c0753f2305a5e234293df88aa3e1d9af0 (diff) |
vcl: Improve graphic manager swapping allocation
This improves the counting of the used space by graphics and
makes the manager loop faster.
Change-Id: Ifebe5fe52722d0f22dae0d1bdef02f65afb036ae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109595
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/inc/graphic')
-rw-r--r-- | vcl/inc/graphic/Manager.hxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/vcl/inc/graphic/Manager.hxx b/vcl/inc/graphic/Manager.hxx index bff72780cbd7..098c8644ac61 100644 --- a/vcl/inc/graphic/Manager.hxx +++ b/vcl/inc/graphic/Manager.hxx @@ -41,6 +41,7 @@ private: Manager(); void registerGraphic(const std::shared_ptr<ImpGraphic>& rImpGraphic); + void loopGraphicsAndSwapOut(); DECL_LINK(SwapOutTimerHandler, Timer*, void); @@ -49,8 +50,8 @@ private: public: static Manager& get(); - void swappedIn(const ImpGraphic* pImpGraphic); - void swappedOut(const ImpGraphic* pImpGraphic); + void swappedIn(const ImpGraphic* pImpGraphic, sal_Int64 nSizeBytes); + void swappedOut(const ImpGraphic* pImpGraphic, sal_Int64 nSizeBytes); void reduceGraphicMemory(); void changeExisting(const ImpGraphic* pImpGraphic, sal_Int64 nOldSize); |