mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
internal/atlas, initernal/graphics: Bug fix: Needed to reset 'notFullyUsedTime'
This commit is contained in:
parent
15f62bfeb5
commit
d236d73a1f
@ -81,6 +81,7 @@ func (t *temporaryPixels) resetAtFrameEnd() {
|
||||
// Let the pixels GCed if this is not used for a while.
|
||||
if t.notFullyUsedTime == maxNotFullyUsedTime && len(t.pixels) > 0 {
|
||||
t.pixels = nil
|
||||
t.notFullyUsedTime = 0
|
||||
}
|
||||
|
||||
// Reset the position and reuse the allocated bytes.
|
||||
|
@ -108,6 +108,7 @@ func (v *verticesBackend) lockAndReset(f func() error) error {
|
||||
|
||||
if v.notFullyUsedTime == maxNotFullyUsedTime && len(v.backend) > 0 {
|
||||
v.backend = nil
|
||||
v.notFullyUsedTime = 0
|
||||
}
|
||||
|
||||
v.pos = 0
|
||||
|
Loading…
Reference in New Issue
Block a user