restorable: Don't record pixels when restoring is disabled

This commit is contained in:
Hajime Hoshi 2019-02-02 00:44:02 +09:00
parent 5be567d58f
commit aad7bdc64d

View File

@ -189,6 +189,11 @@ func (i *Image) ReplacePixels(pixels []byte, x, y, width, height int) {
}
i.image.ReplacePixels(pixels, x, y, width, height)
if !IsRestoringEnabled() {
i.makeStale()
return
}
if x == 0 && y == 0 && width == w && height == h {
if pixels != nil {
if i.basePixels == nil {