mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
internal/atlas, initernal/graphics: Bug fix: Needed to reset 'notFullyUsedTime'
This commit is contained in:
parent
afa1d9ce2a
commit
afded3c711
@ -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