From 676a023a301ca519144347119a9ceccb72afa596 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Thu, 1 Mar 2018 02:45:23 +0900 Subject: [PATCH] restorable: Remove unneeded NextPowerOf2Int usage --- internal/restorable/copy.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/internal/restorable/copy.go b/internal/restorable/copy.go index 1a9c180ff..fb4676822 100644 --- a/internal/restorable/copy.go +++ b/internal/restorable/copy.go @@ -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()