Re: [AD] Using memmove in blit()?

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Peter Wang wrote:

Evert Glebbeek wrote:

There was a bug I'd failed to track down in the original patch that made overlapping blits not work properly. Now corrected.
Commited the attached updated patch instead.

What platforms is this USE_MEMMOVE currently defined for?

It's just defined at the top of the file, so all of them.

Will it not break DJGPP with its special way of doing
bmp_select/bmp_writeXX/bmp_readXX?

One more test is to check whether it will affect performance for
blitting very small bitmaps (function call overhead can become
noticeable here). For example for blitting lots of small particles which
are only a few pixels wide.

Anyway I welcome this change as once it gets officially accepted and
supported, I can contribute assembly optimized memory filling/copying
functions for ARM :) They provide a very noticeable nice performance
boost.

I suggest to make some macro wrappers like:
al_memset8()
al_memset16()
al_memset32()
al_memcpy_forward8()
al_memcpy_forward16()
al_memcpy_forward32()
al_memcpy_backward8()
al_memcpy_backward16()
al_memcpy_backward32()

They can be implemented straightforward using memmove() library function
(for any color depth) or memset() for (8bpp bitmaps), but will allow to
use some optimized implementations for various platforms as well.





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/