mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
restorable: Bug fix: Skip clearImage on emptyImage when restoring
This commit is contained in:
parent
01297fe015
commit
9467a67136
@ -500,7 +500,11 @@ func (i *Image) restore() {
|
||||
|
||||
gimg := graphicscommand.NewImage(w, h)
|
||||
// Clear the image explicitly.
|
||||
clearImage(gimg)
|
||||
if i != emptyImage {
|
||||
// As clearImage uses emptyImage, clearImage cannot be called on emptyImage.
|
||||
// It is OK to skip this since emptyImage has its entire pixel information.
|
||||
clearImage(gimg)
|
||||
}
|
||||
i.basePixels.Apply(gimg)
|
||||
|
||||
for _, c := range i.drawTrianglesHistory {
|
||||
|
Loading…
Reference in New Issue
Block a user