WIP disabled glyph cache

This commit is contained in:
gerald1248 2016-12-11 01:58:46 +01:00
parent 1286d3b203
commit 5a77fece5e
1 changed files with 3 additions and 0 deletions

View File

@ -10,6 +10,8 @@ func init() {
// FetchGlyph fetches a glyph from the cache, calling renderGlyph first if it doesn't already exist
func FetchGlyph(gc draw2d.GraphicContext, fontName string, chr rune) *Glyph {
return renderGlyph(gc, fontName, chr)
/*
if glyphCache[fontName] == nil {
glyphCache[fontName] = make(map[rune]*Glyph, 60)
}
@ -17,6 +19,7 @@ func FetchGlyph(gc draw2d.GraphicContext, fontName string, chr rune) *Glyph {
glyphCache[fontName][chr] = renderGlyph(gc, fontName, chr)
}
return glyphCache[fontName][chr].Copy()
*/
}
// renderGlyph renders a glyph then caches and returns it