mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-12 03:58:55 +01:00
restorable: Don't call (*graphicscommand.Image).Pixels twice (2)
This commit is contained in:
parent
3faa674e32
commit
0546783ad5
@ -508,9 +508,10 @@ func (i *Image) restore() error {
|
|||||||
}
|
}
|
||||||
i.image = gimg
|
i.image = gimg
|
||||||
|
|
||||||
|
pix := gimg.Pixels()
|
||||||
i.basePixels = &Pixels{
|
i.basePixels = &Pixels{
|
||||||
pixels: gimg.Pixels(),
|
pixels: pix,
|
||||||
length: len(gimg.Pixels()),
|
length: len(pix),
|
||||||
}
|
}
|
||||||
i.drawImageHistory = nil
|
i.drawImageHistory = nil
|
||||||
i.stale = false
|
i.stale = false
|
||||||
|
Loading…
Reference in New Issue
Block a user