1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

RenderingHelpers: Reduce templating of GlyphCache

This commit is contained in:
reuk 2024-02-28 13:04:41 +00:00
parent f5017be881
commit bc654f8007
No known key found for this signature in database
GPG key ID: FCB43929F012EE5C
2 changed files with 82 additions and 86 deletions

View file

@ -1753,15 +1753,13 @@ struct SavedState final : public RenderingHelpers::SavedStateBase<SavedState>
}
}
using GlyphCacheType = RenderingHelpers::GlyphCache<RenderingHelpers::CachedGlyphEdgeTable<SavedState>, SavedState>;
void drawGlyph (int glyphNumber, const AffineTransform& trans)
{
if (clip != nullptr)
{
if (trans.isOnlyTranslation() && ! transform.isRotated)
{
auto& cache = GlyphCacheType::getInstance();
auto& cache = RenderingHelpers::GlyphCache::getInstance();
Point<float> pos (trans.getTranslationX(), trans.getTranslationY());
if (transform.isOnlyTranslated)
@ -1937,7 +1935,7 @@ private:
static void clearOpenGLGlyphCacheCallback()
{
SavedState::GlyphCacheType::getInstance().reset();
RenderingHelpers::GlyphCache::getInstance().reset();
}
static std::unique_ptr<LowLevelGraphicsContext> createOpenGLContext (const Target& target)