LMMS
Loading...
Searching...
No Matches
juce::RenderingHelpers::GlyphCache< CachedGlyphType, RenderTargetType > Class Template Reference

#include <juce_RenderingHelpers.h>

Inheritance diagram for juce::RenderingHelpers::GlyphCache< CachedGlyphType, RenderTargetType >:
juce::DeletedAtShutdown

Public Member Functions

 GlyphCache ()
 ~GlyphCache () override
void reset ()
void drawGlyph (RenderTargetType &target, const Font &font, const int glyphNumber, Point< float > pos)
ReferenceCountedObjectPtr< CachedGlyphType > findOrCreateGlyph (const Font &font, int glyphNumber)

Static Public Member Functions

static GlyphCachegetInstance ()

Private Member Functions

ReferenceCountedObjectPtr< CachedGlyphType > findExistingGlyph (const Font &font, int glyphNumber) const noexcept
ReferenceCountedObjectPtr< CachedGlyphType > getGlyphForReuse ()
void addNewGlyphSlots (int num)
CachedGlyphType * findLeastRecentlyUsedGlyph () const noexcept
Private Member Functions inherited from juce::DeletedAtShutdown
 DeletedAtShutdown ()
virtual ~DeletedAtShutdown ()

Static Private Member Functions

static GlyphCache *& getSingletonPointer () noexcept
Static Private Member Functions inherited from juce::DeletedAtShutdown
static void deleteAll ()

Private Attributes

ReferenceCountedArray< CachedGlyphType > glyphs
Atomic< intaccessCounter
Atomic< inthits
Atomic< intmisses
CriticalSection lock

Detailed Description

template<class CachedGlyphType, class RenderTargetType>
class juce::RenderingHelpers::GlyphCache< CachedGlyphType, RenderTargetType >

Holds a cache of recently-used glyph objects of some type.

@tags{Graphics}

Constructor & Destructor Documentation

◆ GlyphCache()

template<class CachedGlyphType, class RenderTargetType>
juce::RenderingHelpers::GlyphCache< CachedGlyphType, RenderTargetType >::GlyphCache ( )
inline

◆ ~GlyphCache()

template<class CachedGlyphType, class RenderTargetType>
juce::RenderingHelpers::GlyphCache< CachedGlyphType, RenderTargetType >::~GlyphCache ( )
inlineoverride

Member Function Documentation

◆ addNewGlyphSlots()

template<class CachedGlyphType, class RenderTargetType>
void juce::RenderingHelpers::GlyphCache< CachedGlyphType, RenderTargetType >::addNewGlyphSlots ( int num)
inlineprivate

◆ drawGlyph()

template<class CachedGlyphType, class RenderTargetType>
void juce::RenderingHelpers::GlyphCache< CachedGlyphType, RenderTargetType >::drawGlyph ( RenderTargetType & target,
const Font & font,
const int glyphNumber,
Point< float > pos )
inline

◆ findExistingGlyph()

template<class CachedGlyphType, class RenderTargetType>
ReferenceCountedObjectPtr< CachedGlyphType > juce::RenderingHelpers::GlyphCache< CachedGlyphType, RenderTargetType >::findExistingGlyph ( const Font & font,
int glyphNumber ) const
inlineprivatenoexcept

◆ findLeastRecentlyUsedGlyph()

template<class CachedGlyphType, class RenderTargetType>
CachedGlyphType * juce::RenderingHelpers::GlyphCache< CachedGlyphType, RenderTargetType >::findLeastRecentlyUsedGlyph ( ) const
inlineprivatenoexcept

◆ findOrCreateGlyph()

template<class CachedGlyphType, class RenderTargetType>
ReferenceCountedObjectPtr< CachedGlyphType > juce::RenderingHelpers::GlyphCache< CachedGlyphType, RenderTargetType >::findOrCreateGlyph ( const Font & font,
int glyphNumber )
inline

◆ getGlyphForReuse()

template<class CachedGlyphType, class RenderTargetType>
ReferenceCountedObjectPtr< CachedGlyphType > juce::RenderingHelpers::GlyphCache< CachedGlyphType, RenderTargetType >::getGlyphForReuse ( )
inlineprivate

◆ getInstance()

template<class CachedGlyphType, class RenderTargetType>
GlyphCache & juce::RenderingHelpers::GlyphCache< CachedGlyphType, RenderTargetType >::getInstance ( )
inlinestatic

◆ getSingletonPointer()

template<class CachedGlyphType, class RenderTargetType>
GlyphCache *& juce::RenderingHelpers::GlyphCache< CachedGlyphType, RenderTargetType >::getSingletonPointer ( )
inlinestaticprivatenoexcept

◆ reset()

template<class CachedGlyphType, class RenderTargetType>
void juce::RenderingHelpers::GlyphCache< CachedGlyphType, RenderTargetType >::reset ( )
inline

Member Data Documentation

◆ accessCounter

template<class CachedGlyphType, class RenderTargetType>
Atomic<int> juce::RenderingHelpers::GlyphCache< CachedGlyphType, RenderTargetType >::accessCounter
private

◆ glyphs

template<class CachedGlyphType, class RenderTargetType>
ReferenceCountedArray<CachedGlyphType> juce::RenderingHelpers::GlyphCache< CachedGlyphType, RenderTargetType >::glyphs
private

◆ hits

template<class CachedGlyphType, class RenderTargetType>
Atomic<int> juce::RenderingHelpers::GlyphCache< CachedGlyphType, RenderTargetType >::hits
private

◆ lock

template<class CachedGlyphType, class RenderTargetType>
CriticalSection juce::RenderingHelpers::GlyphCache< CachedGlyphType, RenderTargetType >::lock
private

◆ misses

template<class CachedGlyphType, class RenderTargetType>
Atomic<int> juce::RenderingHelpers::GlyphCache< CachedGlyphType, RenderTargetType >::misses
private

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