From d823e22bedbf24c0c004a228a6a34d8e3c7292f0 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 2 Oct 2022 23:05:45 +0900 Subject: [PATCH] internal/mipmap: remove unused arguments from DrawTriangles Updates #2369 --- internal/mipmap/mipmap.go | 3 +-- internal/ui/image.go | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/internal/mipmap/mipmap.go b/internal/mipmap/mipmap.go index e5a605748..06a7b3315 100644 --- a/internal/mipmap/mipmap.go +++ b/internal/mipmap/mipmap.go @@ -18,7 +18,6 @@ import ( "fmt" "math" - "github.com/hajimehoshi/ebiten/v2/internal/affine" "github.com/hajimehoshi/ebiten/v2/internal/atlas" "github.com/hajimehoshi/ebiten/v2/internal/buffered" "github.com/hajimehoshi/ebiten/v2/internal/graphics" @@ -66,7 +65,7 @@ func (m *Mipmap) ReadPixels(graphicsDriver graphicsdriver.Graphics, pixels []byt return m.orig.ReadPixels(graphicsDriver, pixels, x, y, width, height) } -func (m *Mipmap) DrawTriangles(srcs [graphics.ShaderImageCount]*Mipmap, vertices []float32, indices []uint16, colorm affine.ColorM, mode graphicsdriver.CompositeMode, filter graphicsdriver.Filter, address graphicsdriver.Address, dstRegion, srcRegion graphicsdriver.Region, subimageOffsets [graphics.ShaderImageCount - 1][2]float32, shader *Shader, uniforms [][]float32, evenOdd bool, canSkipMipmap bool) { +func (m *Mipmap) DrawTriangles(srcs [graphics.ShaderImageCount]*Mipmap, vertices []float32, indices []uint16, mode graphicsdriver.CompositeMode, dstRegion, srcRegion graphicsdriver.Region, subimageOffsets [graphics.ShaderImageCount - 1][2]float32, shader *Shader, uniforms [][]float32, evenOdd bool, canSkipMipmap bool) { if len(indices) == 0 { return } diff --git a/internal/ui/image.go b/internal/ui/image.go index 953d0a331..dd6088e00 100644 --- a/internal/ui/image.go +++ b/internal/ui/image.go @@ -69,7 +69,7 @@ func (i *Image) DrawTriangles(srcs [graphics.ShaderImageCount]*Image, vertices [ srcMipmaps[i] = src.mipmap } - i.mipmap.DrawTriangles(srcMipmaps, vertices, indices, colorm, mode, filter, address, dstRegion, srcRegion, subimageOffsets, shader.shader, uniforms, evenOdd, canSkipMipmap) + i.mipmap.DrawTriangles(srcMipmaps, vertices, indices, mode, dstRegion, srcRegion, subimageOffsets, shader.shader, uniforms, evenOdd, canSkipMipmap) } func (i *Image) WritePixels(pix []byte, x, y, width, height int) { @@ -191,7 +191,7 @@ func (i *Image) resolveDotsCacheIfNeeded() { Width: float32(i.width), Height: float32(i.height), } - i.mipmap.DrawTriangles(srcs, vs, is, affine.ColorMIdentity{}, graphicsdriver.CompositeModeCopy, graphicsdriver.FilterNearest, graphicsdriver.AddressUnsafe, dr, graphicsdriver.Region{}, [graphics.ShaderImageCount - 1][2]float32{}, NearestFilterShader.shader, nil, false, true) + i.mipmap.DrawTriangles(srcs, vs, is, graphicsdriver.CompositeModeCopy, dr, graphicsdriver.Region{}, [graphics.ShaderImageCount - 1][2]float32{}, NearestFilterShader.shader, nil, false, true) } func DumpImages(dir string) (string, error) {