mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +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/color"
|
||||
"image/draw"
|
||||
"runtime"
|
||||
)
|
||||
|
||||
// CopyImage copies origImg to a new RGBA image.
|
||||
@ -70,6 +69,5 @@ func CopyImage(origImg image.Image) *image.RGBA {
|
||||
default:
|
||||
draw.Draw(newImg, image.Rect(0, 0, w, h), origImg, origImg.Bounds().Min, draw.Src)
|
||||
}
|
||||
runtime.Gosched()
|
||||
return newImg
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user