From 940d6b11c8065c46d816c607ddb125461205ac7b Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Mon, 3 Oct 2022 01:55:35 +0900 Subject: [PATCH] ebiten: add comments about SubImage as destinations Updates #2232 --- image.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/image.go b/image.go index 5febeeca1..723875410 100644 --- a/image.go +++ b/image.go @@ -703,6 +703,10 @@ func (i *Image) DrawRectShader(width, height int, shader *Shader, options *DrawR // A sub-image returned by SubImage can be used as a rendering source and a rendering destination. // If a sub-image is used as a rendering source, the image is used as if it is a small image. // If a sub-image is used as a rendering destination, the region being rendered is clipped. +// +// Successive uses of multiple various regions as rendering destination might not be efficient, +// even though all the underlying images are the same. +// It's because such renderings cannot be unified into one internal draw command. func (i *Image) SubImage(r image.Rectangle) image.Image { i.copyCheck() if i.isDisposed() {