mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-26 02:42:02 +01:00
internal/restorable: reland: remove 'volatile' attribute when restorable is not used
This commit is contained in:
parent
c23358ac95
commit
66734dc3fb
@ -169,10 +169,12 @@ func NewImage(width, height int, imageType ImageType) *Image {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var attribute string
|
var attribute string
|
||||||
|
if needsRestoration() {
|
||||||
switch imageType {
|
switch imageType {
|
||||||
case ImageTypeVolatile:
|
case ImageTypeVolatile:
|
||||||
attribute = "volatile"
|
attribute = "volatile"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
i := &Image{
|
i := &Image{
|
||||||
image: graphicscommand.NewImage(width, height, imageType == ImageTypeScreen, attribute),
|
image: graphicscommand.NewImage(width, height, imageType == ImageTypeScreen, attribute),
|
||||||
width: width,
|
width: width,
|
||||||
|
Loading…
Reference in New Issue
Block a user