Holds a cache of recently-used glyph objects of some type. More...
#include <juce_RenderingHelpers.h>
Public Member Functions | |
GlyphCache () | |
~GlyphCache () | |
void | drawGlyph (RenderTargetType &target, const Font &font, const int glyphNumber, Point< float > pos) |
ReferenceCountedObjectPtr< CachedGlyphType > | findOrCreateGlyph (const Font &font, int glyphNumber) |
void | reset () |
Static Public Member Functions | |
static GlyphCache & | getInstance () |
Private Member Functions | |
void | addNewGlyphSlots (int num) |
CachedGlyphType * | findExistingGlyph (const Font &font, int glyphNumber) const |
CachedGlyphType * | findLeastRecentlyUsedGlyph () const noexcept |
CachedGlyphType * | getGlyphForReuse () |
Static Private Member Functions | |
static void | deleteAll () |
Deletes all extant objects. More... | |
static GlyphCache *& | getSingletonPointer () noexcept |
Private Attributes | |
Atomic< int > | accessCounter |
ReferenceCountedArray< CachedGlyphType > | glyphs |
Atomic< int > | hits |
CriticalSection | lock |
Atomic< int > | misses |
Friends | |
struct | ContainerDeletePolicy< CachedGlyphType > |
Holds a cache of recently-used glyph objects of some type.
|
inline |
|
inline |
|
inlineprivate |
|
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.
|
inline |
Referenced by RenderingHelpers::SoftwareRendererSavedState::drawGlyph().
|
inlineprivate |
|
inlineprivatenoexcept |
|
inline |
References jassert.
|
inlineprivate |
|
inlinestatic |
|
inlinestaticprivatenoexcept |
References JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR.
|
inline |
|
friend |
|
private |
|
private |
|
private |
|
private |
|
private |