Re: [AD] pink color conversion blit bug |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
> > it again right now.. the 32->16 no dithering shows that after my
> > patch conversions are only running at about 60% compared to
> > before. I didn't expect the patch to have such a high impact on
> > speed, it should only add one bit-flag test to every pixel.
>
> Well, IMHO checking the flag for every pixel is not a good idea, but
> check it only once before blitting would be better.
>
> IOW, having other blitting functions for KEEP_TRANS instead of
> patching existing ones and call those new special ones if the flag
> is set, making the check only once and not loosing any speed in old
> ones what do you think?
Yes, seeing the speed difference now, this seems to be a better
solution. Originally, i didn't want to copy all the functions in blit.c,
just to add a test for the KEEP_TRANS flag, and no other changes. Maybe
I should try doing some more #define magic, resulting in fewer doubled
code, but even greater un-readability :)
Maybe anyone who knows the code in blit.c can give some advice how it
would be done best ?
When talking about the blit code, does anyone know why the load_bmp.c,
load_pcx.c .. functions use their own color conversion instead of
blit() - unlike the datafile routines which are using blit ?