From 92e56d53f12070efb9ac6016b901e2613f0b9844 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Fri, 8 Apr 2016 04:08:45 +0900 Subject: [PATCH] graphics: Reduce the size of vertices array --- image.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/image.go b/image.go index b88e2ac8a..485a18b2b 100644 --- a/image.go +++ b/image.go @@ -105,7 +105,7 @@ func (i *Image) DrawImage(image *Image, options *DrawImageOptions) (err error) { } quads := &textureQuads{parts: parts, width: image.width, height: image.height} // TODO: Reuse one vertices instead of making here, but this would need locking. - vertices := make([]int16, 16*graphics.MaxQuads) + vertices := make([]int16, parts.Len()*16) n := quads.vertices(vertices) if n == 0 { return nil