WIP disabled glyph cache
This commit is contained in:
parent
1286d3b203
commit
5a77fece5e
1 changed files with 3 additions and 0 deletions
|
@ -10,6 +10,8 @@ func init() {
|
||||||
|
|
||||||
// FetchGlyph fetches a glyph from the cache, calling renderGlyph first if it doesn't already exist
|
// 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 {
|
func FetchGlyph(gc draw2d.GraphicContext, fontName string, chr rune) *Glyph {
|
||||||
|
return renderGlyph(gc, fontName, chr)
|
||||||
|
/*
|
||||||
if glyphCache[fontName] == nil {
|
if glyphCache[fontName] == nil {
|
||||||
glyphCache[fontName] = make(map[rune]*Glyph, 60)
|
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)
|
glyphCache[fontName][chr] = renderGlyph(gc, fontName, chr)
|
||||||
}
|
}
|
||||||
return glyphCache[fontName][chr].Copy()
|
return glyphCache[fontName][chr].Copy()
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
// renderGlyph renders a glyph then caches and returns it
|
// renderGlyph renders a glyph then caches and returns it
|
||||||
|
|
Loading…
Reference in a new issue