diff --git a/internal/restorable/image.go b/internal/restorable/image.go index 2a072e5c2..6147a26e8 100644 --- a/internal/restorable/image.go +++ b/internal/restorable/image.go @@ -154,7 +154,11 @@ func NewImage(width, height int) *Image { // reading pixels from GPU are expensive operations. Volatile images can skip such oprations, but the image content // is cleared every frame instead. func (i *Image) SetVolatile(volatile bool) { + changed := i.volatile != volatile i.volatile = volatile + if changed { + i.makeStale() + } } // Extend extends the image by the given size.