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

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
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
This commit is contained in:
Tomaž Vajngerl
2018-04-04 17:51:26 +09:00
committed by Tomaž Vajngerl
parent 92ac45b192
commit a2b53fece1
7 changed files with 371 additions and 31 deletions

View File

@@ -199,6 +199,7 @@ public:
|| (loplugin::DeclCheck(pVarDecl).Var("aAllListeners")
.Class("ScAddInListener").GlobalNamespace()) // not owning
|| name == "s_pLOKWindowsMap" // LOK only, guarded by assert, and LOK never tries to perform a VCL cleanup
|| name == "gStaticManager" // vcl/source/graphic/Manager.cxx - stores non-owning pointers
) // these variables appear unproblematic
{
return true;