mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 11:18:54 +01:00
internal/restorable: use clearImage to avoid allocations
This commit is contained in:
parent
e768e8ad40
commit
cc8cf688f4
@ -130,7 +130,7 @@ func (pr *pixelsRecords) apply(img *graphicscommand.Image) {
|
||||
if r.pix != nil {
|
||||
img.WritePixels(r.pix, r.rect)
|
||||
} else {
|
||||
img.WritePixels(make([]byte, 4*r.rect.Dx()*r.rect.Dy()), r.rect)
|
||||
clearImage(img, r.rect)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user