mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-11 19:48:54 +01:00
text: Add comments
This commit is contained in:
parent
c70ebdc697
commit
cd779b678a
@ -291,6 +291,8 @@ func BoundString(face font.Face, text string) image.Rectangle {
|
||||
// cache and render it for each rune. This is very inefficient because creating a glyph image and rendering it are
|
||||
// different operations and can never be merged as one draw call. CacheGlyphs creates necessary glyphs without
|
||||
// rendering them so that these operations are likely merged into one draw call.
|
||||
//
|
||||
// If a rune's glyph is already cached, CacheGlyphs does nothing for the rune.
|
||||
func CacheGlyphs(face font.Face, text string) {
|
||||
textM.Lock()
|
||||
defer textM.Unlock()
|
||||
|
Loading…
Reference in New Issue
Block a user