From 9464dc2f5850362823b8c9e92eac55b3efca7f92 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sat, 31 Oct 2020 02:59:34 +0900 Subject: [PATCH] ebiten: Refactoring: canSkipMipmap --- image.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/image.go b/image.go index 72fef61c6..c3eeb5544 100644 --- a/image.go +++ b/image.go @@ -88,14 +88,10 @@ func (i *Image) Fill(clr color.Color) { } func canSkipMipmap(geom GeoM, filter driver.Filter) bool { - det := geom.det2x2() - if filter == driver.FilterNearest && det <= 1.001 { + if filter != driver.FilterLinear { return true } - if filter == driver.FilterLinear && det >= 0.999 { - return true - } - return false + return geom.det2x2() >= 0.999 } // DrawImageOptions represents options for DrawImage.