internal/restorable: reland: remove 'volatile' attribute when restorable is not used

This commit is contained in:
Hajime Hoshi 2024-09-21 23:29:32 +09:00
parent c23358ac95
commit 66734dc3fb

View File

@ -169,9 +169,11 @@ func NewImage(width, height int, imageType ImageType) *Image {
} }
var attribute string var attribute string
switch imageType { if needsRestoration() {
case ImageTypeVolatile: switch imageType {
attribute = "volatile" case ImageTypeVolatile:
attribute = "volatile"
}
} }
i := &Image{ i := &Image{
image: graphicscommand.NewImage(width, height, imageType == ImageTypeScreen, attribute), image: graphicscommand.NewImage(width, height, imageType == ImageTypeScreen, attribute),