for xoff in range(0, srcwid):
    dstv[dstypos + xoff] = srcv[srcypos + xoff]

def blit_slow(dstv, dsthgt, dstwid, dstybase, dstxbase, srcv, srchgt, srcwid):
    for yoff in range(0, srchgt):
        for xoff in range(0, srcwid):
            dstv[dstybase + yoff][dstxbase + xoff] = srcv[yoff][xoff]

def blit_convert(dstv, dsthgt, dstwid, dstybase, dstxbase, srcv, srchgt, srcwid
    ):
    for yoff in range(0, srchgt):
        for xoff in range(0, srcwid):
            dstv[dstybase + yoff][dstxbase + xoff] = convert(srcv, yoff, xoff)
Improving Display Performance