mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-11 19:48:54 +01:00
internal/restorable: reland: remove 'volatile' attribute when restorable is not used
This commit is contained in:
parent
c23358ac95
commit
66734dc3fb
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user