LibreOffice Module vcl (master) 1
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
vcl::graphic::Manager Class Referencefinal

#include <Manager.hxx>

Collaboration diagram for vcl::graphic::Manager:
[legend]

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< ImpGraphiccopy (std::shared_ptr< ImpGraphic > const &pImpGraphic)
 
std::shared_ptr< ImpGraphicnewInstance ()
 
std::shared_ptr< ImpGraphicnewInstance (const BitmapEx &rBitmapEx)
 
std::shared_ptr< ImpGraphicnewInstance (std::shared_ptr< GfxLink > const &rLink, sal_Int32 nPageIndex=0)
 
std::shared_ptr< ImpGraphicnewInstance (const std::shared_ptr< VectorGraphicData > &rVectorGraphicDataPtr)
 
std::shared_ptr< ImpGraphicnewInstance (const Animation &rAnimation)
 
std::shared_ptr< ImpGraphicnewInstance (const GDIMetaFile &rMtf)
 
std::shared_ptr< ImpGraphicnewInstance (const GraphicExternalLink &rGraphicLink)
 

Static Public Member Functions

static Managerget ()
 

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
 

Detailed Description

Definition at line 32 of file Manager.hxx.

Constructor & Destructor Documentation

◆ Manager()

vcl::graphic::Manager::Manager ( )
private

Member Function Documentation

◆ changeExisting()

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=().

◆ copy()

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=().

◆ DECL_LINK()

vcl::graphic::Manager::DECL_LINK ( SwapOutTimerHandler  ,
Timer ,
void   
)
private

◆ dropCache()

void vcl::graphic::Manager::dropCache ( )

Definition at line 152 of file Manager.cxx.

References maMutex, and reduceGraphicMemory().

Referenced by vcl::lok::trimMemory().

◆ dumpState()

void vcl::graphic::Manager::dumpState ( rtl::OStringBuffer &  rState)

◆ get()

Manager & vcl::graphic::Manager::get ( )
static

◆ getGraphicSizeBytes()

sal_Int64 vcl::graphic::Manager::getGraphicSizeBytes ( const ImpGraphic pImpGraphic)
staticprivate

◆ loopGraphicsAndSwapOut()

void vcl::graphic::Manager::loopGraphicsAndSwapOut ( std::unique_lock< std::mutex > &  rGuard,
bool  bDropAll 
)
private

◆ newInstance() [1/7]

std::shared_ptr< ImpGraphic > vcl::graphic::Manager::newInstance ( )

Definition at line 239 of file Manager.cxx.

References registerGraphic().

Referenced by Graphic::Graphic().

◆ newInstance() [2/7]

std::shared_ptr< ImpGraphic > vcl::graphic::Manager::newInstance ( const Animation rAnimation)

Definition at line 261 of file Manager.cxx.

References registerGraphic().

◆ newInstance() [3/7]

std::shared_ptr< ImpGraphic > vcl::graphic::Manager::newInstance ( const BitmapEx rBitmapEx)

Definition at line 254 of file Manager.cxx.

References registerGraphic().

◆ newInstance() [4/7]

std::shared_ptr< ImpGraphic > vcl::graphic::Manager::newInstance ( const GDIMetaFile rMtf)

Definition at line 276 of file Manager.cxx.

References registerGraphic().

◆ newInstance() [5/7]

std::shared_ptr< ImpGraphic > vcl::graphic::Manager::newInstance ( const GraphicExternalLink rGraphicLink)

Definition at line 283 of file Manager.cxx.

References registerGraphic().

◆ newInstance() [6/7]

std::shared_ptr< ImpGraphic > vcl::graphic::Manager::newInstance ( const std::shared_ptr< VectorGraphicData > &  rVectorGraphicDataPtr)

Definition at line 269 of file Manager.cxx.

References registerGraphic().

◆ newInstance() [7/7]

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().

◆ reduceGraphicMemory()

void vcl::graphic::Manager::reduceGraphicMemory ( std::unique_lock< std::mutex > &  rGuard,
bool  bDropAll = false 
)
private

◆ registerGraphic()

void vcl::graphic::Manager::registerGraphic ( const std::shared_ptr< ImpGraphic > &  rImpGraphic)
private

◆ swappedIn()

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().

◆ swappedOut()

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().

◆ unregisterGraphic()

void vcl::graphic::Manager::unregisterGraphic ( ImpGraphic pImpGraphic)

Member Data Documentation

◆ m_pImpGraphicList

o3tl::sorted_vector<ImpGraphic*> vcl::graphic::Manager::m_pImpGraphicList
private

◆ maMutex

std::mutex vcl::graphic::Manager::maMutex
private

◆ maSwapOutTimer

Timer vcl::graphic::Manager::maSwapOutTimer
private

Definition at line 42 of file Manager.hxx.

Referenced by Manager().

◆ mbReducingGraphicMemory

bool vcl::graphic::Manager::mbReducingGraphicMemory
private

Definition at line 39 of file Manager.hxx.

Referenced by reduceGraphicMemory().

◆ mbSwapEnabled

bool vcl::graphic::Manager::mbSwapEnabled
private

Definition at line 38 of file Manager.hxx.

Referenced by Manager(), and reduceGraphicMemory().

◆ mnAllowedIdleTime

std::chrono::seconds vcl::graphic::Manager::mnAllowedIdleTime
private

Definition at line 37 of file Manager.hxx.

Referenced by loopGraphicsAndSwapOut(), and Manager().

◆ mnMemoryLimit

sal_Int64 vcl::graphic::Manager::mnMemoryLimit
private

Definition at line 40 of file Manager.hxx.

Referenced by loopGraphicsAndSwapOut(), Manager(), reduceGraphicMemory(), and registerGraphic().

◆ mnUsedSize

sal_Int64 vcl::graphic::Manager::mnUsedSize
private

The documentation for this class was generated from the following files: