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 swappedIn (const ImpGraphic *pImpGraphic)
 
void swappedOut (const ImpGraphic *pImpGraphic)
 
void reduceGraphicMemory ()
 
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 Bitmap &rBitmap)
 
std::shared_ptr< ImpGraphicnewInstance (const BitmapEx &rBitmapEx)
 
std::shared_ptr< ImpGraphicnewInstance (const VectorGraphicDataPtr &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, OUString const &rsContext)
 
 DECL_LINK (SwapOutTimerHandler, Timer *, void)
 

Static Private Member Functions

static sal_Int64 getGraphicSizeBytes (const ImpGraphic *pImpGraphic)
 

Private Attributes

std::recursive_mutex maMutex
 
std::unordered_set< ImpGraphic * > m_pImpGraphicList
 
std::chrono::seconds mnAllowedIdleTime
 
sal_Int64 mnMemoryLimit
 
sal_Int64 mnUsedSize
 
Timer maSwapOutTimer
 

Detailed Description

Definition at line 32 of file Manager.hxx.

Constructor & Destructor Documentation

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

Member Function Documentation

void vcl::graphic::Manager::changeExisting ( const ImpGraphic pImpGraphic,
sal_Int64  nOldSize 
)

Definition at line 226 of file Manager.cxx.

References getGraphicSizeBytes(), maMutex, and mnUsedSize.

Referenced by ImpGraphic::ImplClear(), and ImpGraphic::operator=().

std::shared_ptr< ImpGraphic > vcl::graphic::Manager::copy ( std::shared_ptr< ImpGraphic > const &  pImpGraphic)

Definition at line 156 of file Manager.cxx.

References registerGraphic().

Referenced by Graphic::Graphic(), Graphic::ImplTestRefCount(), and Graphic::operator=().

vcl::graphic::Manager::DECL_LINK ( SwapOutTimerHandler  ,
Timer ,
void   
)
private
Manager & vcl::graphic::Manager::get ( )
static
sal_Int64 vcl::graphic::Manager::getGraphicSizeBytes ( const ImpGraphic pImpGraphic)
staticprivate
std::shared_ptr< ImpGraphic > vcl::graphic::Manager::newInstance ( )

Definition at line 163 of file Manager.cxx.

References registerGraphic().

Referenced by Graphic::Graphic().

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

Definition at line 170 of file Manager.cxx.

References registerGraphic().

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

Definition at line 177 of file Manager.cxx.

References registerGraphic().

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

Definition at line 191 of file Manager.cxx.

References registerGraphic().

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

Definition at line 184 of file Manager.cxx.

References registerGraphic().

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

Definition at line 198 of file Manager.cxx.

References registerGraphic().

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

Definition at line 205 of file Manager.cxx.

References registerGraphic().

void vcl::graphic::Manager::reduceGraphicMemory ( )
void vcl::graphic::Manager::registerGraphic ( const std::shared_ptr< ImpGraphic > &  rImpGraphic,
OUString const &  rsContext 
)
private
void vcl::graphic::Manager::swappedIn ( const ImpGraphic pImpGraphic)

Definition at line 212 of file Manager.cxx.

References getGraphicSizeBytes(), maMutex, and mnUsedSize.

Referenced by ImpGraphic::ImplSwapIn().

void vcl::graphic::Manager::swappedOut ( const ImpGraphic pImpGraphic)

Definition at line 219 of file Manager.cxx.

References getGraphicSizeBytes(), maMutex, and mnUsedSize.

Referenced by ImpGraphic::ImplSwapOut().

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

Definition at line 148 of file Manager.cxx.

References getGraphicSizeBytes(), m_pImpGraphicList, maMutex, and mnUsedSize.

Referenced by ImpGraphic::~ImpGraphic().

Member Data Documentation

std::unordered_set<ImpGraphic*> vcl::graphic::Manager::m_pImpGraphicList
private

Definition at line 36 of file Manager.hxx.

Referenced by reduceGraphicMemory(), registerGraphic(), and unregisterGraphic().

std::recursive_mutex vcl::graphic::Manager::maMutex
private
Timer vcl::graphic::Manager::maSwapOutTimer
private

Definition at line 40 of file Manager.hxx.

Referenced by Manager().

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

Definition at line 37 of file Manager.hxx.

Referenced by Manager(), and reduceGraphicMemory().

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

Definition at line 38 of file Manager.hxx.

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

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

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