JUCE v8.0.9
JUCE API
 
Loading...
Searching...
No Matches
juce::RenderingHelpers::GlyphCache Class Reference

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

#include <juce_RenderingHelpers.h>

Inheritance diagram for juce::RenderingHelpers::GlyphCache:
Collaboration diagram for juce::RenderingHelpers::GlyphCache:

Classes

struct  Key
 

Public Member Functions

 GlyphCache ()=default
 
 ~GlyphCache () override
 
const auto & get (const Font &font, const int glyphNumber)
 
void reset ()
 

Static Public Member Functions

static GlyphCachegetInstance ()
 

Static Private Member Functions

static void deleteAll ()
 Deletes all extant objects.
 
static GlyphCache *& getSingletonPointer () noexcept
 

Private Attributes

LruCache< Key, std::vector< GlyphLayer > > cache
 
CriticalSection lock
 

Detailed Description

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

@tags{Graphics}

Constructor & Destructor Documentation

◆ GlyphCache()

juce::RenderingHelpers::GlyphCache::GlyphCache ( )
default

Referenced by getInstance().

◆ ~GlyphCache()

juce::RenderingHelpers::GlyphCache::~GlyphCache ( )
inlineoverride

References getSingletonPointer().

Member Function Documentation

◆ deleteAll()

static void juce::DeletedAtShutdown::deleteAll ( )
staticinherited

Deletes all extant objects.

This shouldn't be used by applications, as it's called automatically in the shutdown code of the JUCEApplicationBase class.

◆ get()

const auto & juce::RenderingHelpers::GlyphCache::get ( const Font font,
const int  glyphNumber 
)
inline

◆ getInstance()

◆ getSingletonPointer()

static GlyphCache *& juce::RenderingHelpers::GlyphCache::getSingletonPointer ( )
inlinestaticprivatenoexcept

Referenced by ~GlyphCache(), and getInstance().

◆ reset()

void juce::RenderingHelpers::GlyphCache::reset ( )
inline

Member Data Documentation

◆ cache

LruCache<Key, std::vector<GlyphLayer> > juce::RenderingHelpers::GlyphCache::cache
private

Referenced by get(), and reset().

◆ lock

CriticalSection juce::RenderingHelpers::GlyphCache::lock
private

Referenced by get(), and reset().


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