mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-12 12:08:58 +01:00
graphicsutil: Remove Gosched that might be harmful on browsers
This was introduced at 006f87d02b
but this can be harmful when many images are created by NewImageFromImage
This commit is contained in:
parent
08610fcd8b
commit
8dbb11a23c
@ -18,7 +18,6 @@ import (
|
|||||||
"image"
|
"image"
|
||||||
"image/color"
|
"image/color"
|
||||||
"image/draw"
|
"image/draw"
|
||||||
"runtime"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// CopyImage copies origImg to a new RGBA image.
|
// CopyImage copies origImg to a new RGBA image.
|
||||||
@ -70,6 +69,5 @@ func CopyImage(origImg image.Image) *image.RGBA {
|
|||||||
default:
|
default:
|
||||||
draw.Draw(newImg, image.Rect(0, 0, w, h), origImg, origImg.Bounds().Min, draw.Src)
|
draw.Draw(newImg, image.Rect(0, 0, w, h), origImg, origImg.Bounds().Min, draw.Src)
|
||||||
}
|
}
|
||||||
runtime.Gosched()
|
|
||||||
return newImg
|
return newImg
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user