ebiten: refactoring

This commit is contained in:
Hajime Hoshi
2025-07-19 22:17:30 +09:00
parent 1284f09201
commit fb60c54510

View File

@@ -1146,8 +1146,7 @@ func (i *Image) SubImage(r image.Rectangle) image.Image {
return img
}
tick := Tick()
if i.subImageGCLastTick != tick {
if tick := Tick(); i.subImageGCLastTick < tick {
i.subImageGCLastTick = tick
for _, img := range i.subImageCache {