Skip to content

Commit

Permalink
Fix todo with a doc update
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Oct 13, 2024
1 parent f10935b commit fe31121
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/cache/texture_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,14 @@ func RangeExpiredTexturesFor(canvas fyne.Canvas, f func(fyne.CanvasObject)) {
}

// RangeTexturesFor range over the textures for the specified canvas.
// It will not return the texture for a `canvas.Text` as their render lifecycle is handled separately.
//
// Note: If this is used to free textures, then it should be called inside a current
// gl context to ensure textures are deleted from gl.
func RangeTexturesFor(canvas fyne.Canvas, f func(fyne.CanvasObject)) {
textures.Range(func(key, value any) bool {
if _, ok := key.(FontCacheEntry); ok {
return true // TODO what?
return true // do nothing, text cache lives outside the scope of an object
}

obj, tinfo := key.(fyne.CanvasObject), value.(*textureInfo)
Expand Down

0 comments on commit fe31121

Please sign in to comment.