Re: [AD] About Elias' bug

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


"Eric Botcazou" <ebotcazou@xxxxxxxxxx> writes:

> I've just browsed the story. I think we should try to find a solution,
> because transparency needs to be preserved through color conversion.
> 
> So far Elias has proposed two solutions:
> - testing color value on a per-pixel basis: minimal amount of added code,
> but huge slowdown for every blit() between color formats,
> - brand new blit_keep_trans() function: in order not to duplicate the whole
> blit.c file, the function has to be very generic, hence very slow.

Just an idea, maybe it is not applicable here.

Move code from blit.c into some header file, add defines in some
places to test for transparency or don't test for transparency (change
putpixel or its equivalent?).  In blit.c arrange defines to blit the
whole bitmap and include header file, then set defines to test for
transparency and include header file again (function names should be
defined too), then write top-level functions (blit, masked_blit...).

-- 
Michael Bukin



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