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
switch imageType {
case ImageTypeVolatile:
attribute = "volatile"
if needsRestoration() {
switch imageType {
case ImageTypeVolatile:
attribute = "volatile"
}
}
i := &Image{
image: graphicscommand.NewImage(width, height, imageType == ImageTypeScreen, attribute),