restorable: Remove unneeded NextPowerOf2Int usage

This commit is contained in:
Hajime Hoshi 2018-03-01 02:45:23 +09:00
parent 1068156215
commit 676a023a30

View File

@ -19,8 +19,6 @@ import (
"image/color"
"image/draw"
"runtime"
"github.com/hajimehoshi/ebiten/internal/math"
)
// CopyImage copies origImg to a new RGBA image.
@ -32,7 +30,7 @@ import (
func CopyImage(origImg image.Image) *image.RGBA {
size := origImg.Bounds().Size()
w, h := size.X, size.Y
newImg := image.NewRGBA(image.Rect(0, 0, math.NextPowerOf2Int(w), math.NextPowerOf2Int(h)))
newImg := image.NewRGBA(image.Rect(0, 0, w, h))
switch origImg := origImg.(type) {
case *image.Paletted:
b := origImg.Bounds()