mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
widget: make glyphIndex reusable
This commit allows the glyph index type to be reset and reused, preventing the reallocation of numerous buffers when indexing glyphs. Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
This commit is contained in:
+1
-1
@@ -413,7 +413,7 @@ func (e *textView) layoutText(lt *text.Shaper) {
|
||||
e.maskReader.Reset(e, e.Mask)
|
||||
r = &e.maskReader
|
||||
}
|
||||
e.index = glyphIndex{}
|
||||
e.index.reset()
|
||||
it := textIterator{viewport: image.Rectangle{Max: image.Point{X: math.MaxInt, Y: math.MaxInt}}}
|
||||
if lt != nil {
|
||||
lt.Layout(text.Parameters{
|
||||
|
||||
Reference in New Issue
Block a user