restorable: Don't call (*graphicscommand.Image).Pixels twice (2)

This commit is contained in:
Hajime Hoshi 2019-02-14 01:00:11 +09:00
parent 3faa674e32
commit 0546783ad5

View File

@ -508,9 +508,10 @@ func (i *Image) restore() error {
}
i.image = gimg
pix := gimg.Pixels()
i.basePixels = &Pixels{
pixels: gimg.Pixels(),
length: len(gimg.Pixels()),
pixels: pix,
length: len(pix),
}
i.drawImageHistory = nil
i.stale = false