From 66734dc3fbb03f1c74881a151b7c060ddfed783c Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sat, 21 Sep 2024 23:29:32 +0900 Subject: [PATCH] internal/restorable: reland: remove 'volatile' attribute when restorable is not used --- internal/restorable/image.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/internal/restorable/image.go b/internal/restorable/image.go index eab5ccc9b..b974283f1 100644 --- a/internal/restorable/image.go +++ b/internal/restorable/image.go @@ -169,9 +169,11 @@ func NewImage(width, height int, imageType ImageType) *Image { } var attribute string - switch imageType { - case ImageTypeVolatile: - attribute = "volatile" + if needsRestoration() { + switch imageType { + case ImageTypeVolatile: + attribute = "volatile" + } } i := &Image{ image: graphicscommand.NewImage(width, height, imageType == ImageTypeScreen, attribute),