vcl: Add a internal (memory) manager for Graphic objects

Desktop / LibreOffice - Tomaž Vajngerl [collabora.co.uk] - 12 April 2018 12:35 EDT

This adds vcl::graphic::Manager which is a manager singleton that tracks all the creation fo graphic objects and swaps them out on a time and allocation basis.

Time based - every number of seconds it looks for Graphics that weren't used for a time.

Allocation based - when creating a new Graphic and the total of Graphic uses more than the total amount of memory for Graphics defined in configuration, it tries to release the Graphics that weren't used for a time.

Change-Id: I5dbf74db4a6455d32c4abcbad7be21c7f0534642 Reviewed-on: https://gerrit.libreoffice.org/52396

a2b53fece14f vcl: Add a internal (memory) manager for Graphic objects
compilerplugins/clang/badstatics.cxx | 1 +
vcl/Library_vcl.mk | 1 +
vcl/inc/graphic/Manager.hxx | 71 +++++++++++++
vcl/inc/impgraph.hxx | 27 +++--
vcl/source/gdi/graph.cxx | 26 ++---
vcl/source/gdi/impgraph.cxx | 76 +++++++++++--
vcl/source/graphic/Manager.cxx | 200 +++++++++++++++++++++++++++++++++++
7 files changed, 371 insertions(+), 31 deletions(-)

Upstream: cgit.freedesktop.org


  • Share