LibreOffice Module vcl (master) 1
|
#include <Manager.hxx>
Public Member Functions | |
void | dropCache () |
void | dumpState (rtl::OStringBuffer &rState) |
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, bool bDropAll) |
DECL_LINK (SwapOutTimerHandler, Timer *, void) | |
void | reduceGraphicMemory (std::unique_lock< std::mutex > &rGuard, bool bDropAll=false) |
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 32 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 308 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 232 of file Manager.cxx.
References registerGraphic().
Referenced by Graphic::Graphic(), Graphic::ImplTestRefCount(), and Graphic::operator=().
|
private |
void vcl::graphic::Manager::dropCache | ( | ) |
Definition at line 152 of file Manager.cxx.
References maMutex, and reduceGraphicMemory().
Referenced by vcl::lok::trimMemory().
void vcl::graphic::Manager::dumpState | ( | rtl::OStringBuffer & | rState | ) |
Definition at line 159 of file Manager.cxx.
References m_pImpGraphicList, maMutex, mnUsedSize, and o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::size().
Referenced by vcl::lok::dumpState().
|
static |
Definition at line 54 of file Manager.cxx.
Referenced by ImpGraphic::clear(), vcl::lok::dumpState(), Graphic::Graphic(), Graphic::ImplTestRefCount(), Graphic::operator=(), ImpGraphic::operator=(), ImpGraphic::swapIn(), ImpGraphic::swapOut(), vcl::lok::trimMemory(), and ImpGraphic::~ImpGraphic().
|
staticprivate |
Definition at line 175 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 239 of file Manager.cxx.
References registerGraphic().
Referenced by Graphic::Graphic().
std::shared_ptr< ImpGraphic > vcl::graphic::Manager::newInstance | ( | const Animation & | rAnimation | ) |
Definition at line 261 of file Manager.cxx.
References registerGraphic().
std::shared_ptr< ImpGraphic > vcl::graphic::Manager::newInstance | ( | const BitmapEx & | rBitmapEx | ) |
Definition at line 254 of file Manager.cxx.
References registerGraphic().
std::shared_ptr< ImpGraphic > vcl::graphic::Manager::newInstance | ( | const GDIMetaFile & | rMtf | ) |
Definition at line 276 of file Manager.cxx.
References registerGraphic().
std::shared_ptr< ImpGraphic > vcl::graphic::Manager::newInstance | ( | const GraphicExternalLink & | rGraphicLink | ) |
Definition at line 283 of file Manager.cxx.
References registerGraphic().
std::shared_ptr< ImpGraphic > vcl::graphic::Manager::newInstance | ( | const std::shared_ptr< VectorGraphicData > & | rVectorGraphicDataPtr | ) |
Definition at line 269 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 246 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 dropCache(), and registerGraphic().
|
private |
Definition at line 191 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 290 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 299 of file Manager.cxx.
References maMutex, and mnUsedSize.
Referenced by ImpGraphic::swapOut().
void vcl::graphic::Manager::unregisterGraphic | ( | ImpGraphic * | pImpGraphic | ) |
Definition at line 224 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 36 of file Manager.hxx.
Referenced by dumpState(), loopGraphicsAndSwapOut(), reduceGraphicMemory(), registerGraphic(), and unregisterGraphic().
|
private |
Definition at line 35 of file Manager.hxx.
Referenced by changeExisting(), dropCache(), dumpState(), reduceGraphicMemory(), registerGraphic(), swappedIn(), swappedOut(), and unregisterGraphic().
|
private |
Definition at line 42 of file Manager.hxx.
Referenced by Manager().
|
private |
Definition at line 39 of file Manager.hxx.
Referenced by reduceGraphicMemory().
|
private |
Definition at line 38 of file Manager.hxx.
Referenced by Manager(), and reduceGraphicMemory().
|
private |
Definition at line 37 of file Manager.hxx.
Referenced by loopGraphicsAndSwapOut(), and Manager().
|
private |
Definition at line 40 of file Manager.hxx.
Referenced by loopGraphicsAndSwapOut(), Manager(), reduceGraphicMemory(), and registerGraphic().
|
private |
Definition at line 41 of file Manager.hxx.
Referenced by changeExisting(), dumpState(), loopGraphicsAndSwapOut(), reduceGraphicMemory(), registerGraphic(), swappedIn(), swappedOut(), and unregisterGraphic().