I'm working on some blitting code from regular memory to the screen display that rotates on the fly.
This is the basic code after variable initialization...
This routine takes about 10 msec to copy from regular memory to the non-cached display memory. Has anyone got a significantly faster routine then this that they wouldn't mind sharing.
My experiments have shown that writing 32-bits at a time is much faster then writing 16-bits. I've been thinking of modifying this routine to write 32-bits at a time by have two source pointers from neighboring scanlines. Anyone tried this with success?
Thanks for any info.
This is the basic code after variable initialization...
- Code:
while (y--)
{
pSrc = pSrcTmp;
pDst = pDstTmp;
x = iWidth;
while (x--)
{
*pDst = *pSrc++;
pDst -= destYPitch;
}
pDstTmp += destXPitch;
pSrcTmp -= rowOffset;
}
This routine takes about 10 msec to copy from regular memory to the non-cached display memory. Has anyone got a significantly faster routine then this that they wouldn't mind sharing.
My experiments have shown that writing 32-bits at a time is much faster then writing 16-bits. I've been thinking of modifying this routine to write 32-bits at a time by have two source pointers from neighboring scanlines. Anyone tried this with success?
Thanks for any info.