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, sal_Int64 nSizeBytes)
 
void swappedOut (const ImpGraphic *pImpGraphic, sal_Int64 nSizeBytes)
 
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 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 ()
 
 DECL_LINK (SwapOutTimerHandler, Timer *, void)
 

Static Private Member Functions

static sal_Int64 getGraphicSizeBytes (const ImpGraphic *pImpGraphic)
 

Private Attributes

std::recursive_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 31 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 276 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 200 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
void vcl::graphic::Manager::loopGraphicsAndSwapOut ( )
private
std::shared_ptr< ImpGraphic > vcl::graphic::Manager::newInstance ( )

Definition at line 207 of file Manager.cxx.

References registerGraphic().

Referenced by Graphic::Graphic().

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

Definition at line 222 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 214 of file Manager.cxx.

References registerGraphic().

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

Definition at line 237 of file Manager.cxx.

References registerGraphic().

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

Definition at line 229 of file Manager.cxx.

References registerGraphic().

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

Definition at line 244 of file Manager.cxx.

References registerGraphic().

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

Definition at line 251 of file Manager.cxx.

References registerGraphic().

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

Definition at line 258 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 267 of file Manager.cxx.

References maMutex, and mnUsedSize.

Referenced by ImpGraphic::swapOut().

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

Member Data Documentation

o3tl::sorted_vector<ImpGraphic*> vcl::graphic::Manager::m_pImpGraphicList
private
std::recursive_mutex vcl::graphic::Manager::maMutex
private
Timer vcl::graphic::Manager::maSwapOutTimer
private

Definition at line 41 of file Manager.hxx.

Referenced by Manager().

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

Definition at line 38 of file Manager.hxx.

Referenced by reduceGraphicMemory().

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

Definition at line 37 of file Manager.hxx.

Referenced by Manager(), and reduceGraphicMemory().

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

Definition at line 36 of file Manager.hxx.

Referenced by loopGraphicsAndSwapOut(), and Manager().

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

Definition at line 39 of file Manager.hxx.

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

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

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