internal/graphicscommand/image.go
func (i *Image) CopyPixels(src *Image) {
	if i.lastCommand == lastCommandDrawTriangles {
		if i.width != src.width || i.height != src.height {
			panic("graphicscommand: Copy for a part after DrawTriangles is forbidden")
		}
	}

	c := &copyPixelsCommand{
		dst: i,
		src: src,
	}
	theCommandQueue.Enqueue(c)

	// The execution is basically same as replacing pixels.
	i.lastCommand = lastCommandReplacePixels
}
func (i *Image) CopyPixels(src *Image) {
	if i.lastCommand == lastCommandDrawTriangles {
		if i.width != src.width || i.height != src.height {
			panic("graphicscommand: Copy for a part after DrawTriangles is forbidden")
		}
	}

	c := &copyPixelsCommand{
		dst: i,
		src: src,
	}
	theCommandQueue.Enqueue(c)

	// The execution is basically same as replacing pixels.
	i.lastCommand = lastCommandReplacePixels
}
// CopyPixels is basically same as Pixels and ReplacePixels, but reading pixels from GPU is done lazily.