LibreOffice Module vcl (master) 1
|
#include <Manager.hxx>
Public Member Functions | |
void | swappedIn (const ImpGraphic *pImpGraphic, sal_Int64 nSizeBytes) |
void | swappedOut (const ImpGraphic *pImpGraphic, sal_Int64 nSizeBytes) |
void | changeExisting (const ImpGraphic *pImpGraphic, sal_Int64 nOldSize) |
void | unregisterGraphic (ImpGraphic *pImpGraphic) |
std::shared_ptr< ImpGraphic > | copy (std::shared_ptr< ImpGraphic > const &pImpGraphic) |
std::shared_ptr< ImpGraphic > | newInstance () |
std::shared_ptr< ImpGraphic > | newInstance (const BitmapEx &rBitmapEx) |
std::shared_ptr< ImpGraphic > | newInstance (std::shared_ptr< GfxLink > const &rLink, sal_Int32 nPageIndex=0) |
std::shared_ptr< ImpGraphic > | newInstance (const std::shared_ptr< VectorGraphicData > &rVectorGraphicDataPtr) |
std::shared_ptr< ImpGraphic > | newInstance (const Animation &rAnimation) |
std::shared_ptr< ImpGraphic > | newInstance (const GDIMetaFile &rMtf) |
std::shared_ptr< ImpGraphic > | newInstance (const GraphicExternalLink &rGraphicLink) |
Static Public Member Functions | |
static Manager & | get () |
Private Member Functions | |
Manager () | |
void | registerGraphic (const std::shared_ptr< ImpGraphic > &rImpGraphic) |
void | loopGraphicsAndSwapOut (std::unique_lock< std::mutex > &rGuard) |
DECL_LINK (SwapOutTimerHandler, Timer *, void) | |
void | reduceGraphicMemory (std::unique_lock< std::mutex > &rGuard) |
Static Private Member Functions | |
static sal_Int64 | getGraphicSizeBytes (const ImpGraphic *pImpGraphic) |
Private Attributes | |
std::mutex | maMutex |
o3tl::sorted_vector< ImpGraphic * > | m_pImpGraphicList |
std::chrono::seconds | mnAllowedIdleTime |
bool | mbSwapEnabled |
bool | mbReducingGraphicMemory |
sal_Int64 | mnMemoryLimit |
sal_Int64 | mnUsedSize |
Timer | maSwapOutTimer |
Definition at line 31 of file Manager.hxx.
|
private |
Definition at line 60 of file Manager.cxx.
References LINK, maSwapOutTimer, mbSwapEnabled, mnAllowedIdleTime, mnMemoryLimit, Timer::SetInvokeHandler(), Timer::SetTimeout(), and Timer::Start().
void vcl::graphic::Manager::changeExisting | ( | const ImpGraphic * | pImpGraphic, |
sal_Int64 | nOldSize | ||
) |
Definition at line 284 of file Manager.cxx.
References getGraphicSizeBytes(), maMutex, and mnUsedSize.
Referenced by ImpGraphic::clear(), and ImpGraphic::operator=().
std::shared_ptr< ImpGraphic > vcl::graphic::Manager::copy | ( | std::shared_ptr< ImpGraphic > const & | pImpGraphic | ) |
Definition at line 208 of file Manager.cxx.
References registerGraphic().
Referenced by Graphic::Graphic(), Graphic::ImplTestRefCount(), and Graphic::operator=().
|
private |
|
static |
Definition at line 54 of file Manager.cxx.
Referenced by ImpGraphic::clear(), Graphic::Graphic(), Graphic::ImplTestRefCount(), Graphic::operator=(), ImpGraphic::operator=(), ImpGraphic::swapIn(), ImpGraphic::swapOut(), and ImpGraphic::~ImpGraphic().
|
staticprivate |
Definition at line 151 of file Manager.cxx.
References ImpGraphic::getSizeBytes(), and ImpGraphic::isAvailable().
Referenced by changeExisting(), loopGraphicsAndSwapOut(), reduceGraphicMemory(), registerGraphic(), and unregisterGraphic().
|
private |
Definition at line 78 of file Manager.cxx.
References getGraphicSizeBytes(), m_pImpGraphicList, mnAllowedIdleTime, mnMemoryLimit, and mnUsedSize.
Referenced by reduceGraphicMemory().
std::shared_ptr< ImpGraphic > vcl::graphic::Manager::newInstance | ( | ) |
Definition at line 215 of file Manager.cxx.
References registerGraphic().
Referenced by Graphic::Graphic().
std::shared_ptr< ImpGraphic > vcl::graphic::Manager::newInstance | ( | const Animation & | rAnimation | ) |
Definition at line 237 of file Manager.cxx.
References registerGraphic().
std::shared_ptr< ImpGraphic > vcl::graphic::Manager::newInstance | ( | const BitmapEx & | rBitmapEx | ) |
Definition at line 230 of file Manager.cxx.
References registerGraphic().
std::shared_ptr< ImpGraphic > vcl::graphic::Manager::newInstance | ( | const GDIMetaFile & | rMtf | ) |
Definition at line 252 of file Manager.cxx.
References registerGraphic().
std::shared_ptr< ImpGraphic > vcl::graphic::Manager::newInstance | ( | const GraphicExternalLink & | rGraphicLink | ) |
Definition at line 259 of file Manager.cxx.
References registerGraphic().
std::shared_ptr< ImpGraphic > vcl::graphic::Manager::newInstance | ( | const std::shared_ptr< VectorGraphicData > & | rVectorGraphicDataPtr | ) |
Definition at line 245 of file Manager.cxx.
References registerGraphic().
std::shared_ptr< ImpGraphic > vcl::graphic::Manager::newInstance | ( | std::shared_ptr< GfxLink > const & | rLink, |
sal_Int32 | nPageIndex = 0 |
||
) |
Definition at line 222 of file Manager.cxx.
References registerGraphic().
|
private |
Definition at line 115 of file Manager.cxx.
References getGraphicSizeBytes(), loopGraphicsAndSwapOut(), m_pImpGraphicList, maMutex, mbReducingGraphicMemory, mbSwapEnabled, mnMemoryLimit, and mnUsedSize.
Referenced by registerGraphic().
|
private |
Definition at line 167 of file Manager.cxx.
References getGraphicSizeBytes(), o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::insert(), m_pImpGraphicList, maMutex, mnMemoryLimit, mnUsedSize, reduceGraphicMemory(), and SAL_INFO_IF.
Referenced by copy(), and newInstance().
void vcl::graphic::Manager::swappedIn | ( | const ImpGraphic * | pImpGraphic, |
sal_Int64 | nSizeBytes | ||
) |
Definition at line 266 of file Manager.cxx.
References maMutex, and mnUsedSize.
Referenced by ImpGraphic::swapIn().
void vcl::graphic::Manager::swappedOut | ( | const ImpGraphic * | pImpGraphic, |
sal_Int64 | nSizeBytes | ||
) |
Definition at line 275 of file Manager.cxx.
References maMutex, and mnUsedSize.
Referenced by ImpGraphic::swapOut().
void vcl::graphic::Manager::unregisterGraphic | ( | ImpGraphic * | pImpGraphic | ) |
Definition at line 200 of file Manager.cxx.
References o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::erase(), getGraphicSizeBytes(), m_pImpGraphicList, maMutex, and mnUsedSize.
Referenced by ImpGraphic::~ImpGraphic().
|
private |
Definition at line 35 of file Manager.hxx.
Referenced by loopGraphicsAndSwapOut(), reduceGraphicMemory(), registerGraphic(), and unregisterGraphic().
|
private |
Definition at line 34 of file Manager.hxx.
Referenced by changeExisting(), reduceGraphicMemory(), registerGraphic(), swappedIn(), swappedOut(), and unregisterGraphic().
|
private |
Definition at line 41 of file Manager.hxx.
Referenced by Manager().
|
private |
Definition at line 38 of file Manager.hxx.
Referenced by reduceGraphicMemory().
|
private |
Definition at line 37 of file Manager.hxx.
Referenced by Manager(), and reduceGraphicMemory().
|
private |
Definition at line 36 of file Manager.hxx.
Referenced by loopGraphicsAndSwapOut(), and Manager().
|
private |
Definition at line 39 of file Manager.hxx.
Referenced by loopGraphicsAndSwapOut(), Manager(), reduceGraphicMemory(), and registerGraphic().
|
private |
Definition at line 40 of file Manager.hxx.
Referenced by changeExisting(), loopGraphicsAndSwapOut(), reduceGraphicMemory(), registerGraphic(), swappedIn(), swappedOut(), and unregisterGraphic().