Re: [AD] pink color conversion blit bug |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
I made an alternative patch now, which duplicates the modex blit function to a new function blit_keep_trans, and uses that function whenever the KEEP_TRANS flag is set. This way, there is no speed loss when not using the flag. I made one exception, dithering to 8bit. It checks on a per-pixel basis, because else there would have been a lot of code to duplicate, for no reason, because the function is too slow to have a speed loss. As a result, the KEEP_TRANS is always very slow now. I'm not sure if this patch is better than my last. It depends on how often the blit conversions will be used *without* the KEEP_TRANS flag. I would say this is very rarely, because most Allegro games will use transparency. ( And with my last patch, the conversion still runs with at least 60% of the original code - with or without KEEP_TRANS). And the last patch added fewer code. The alternative of duplicating all the code in blit.c, only to have a version with the flag, would have high speed in both cases, but IMHO it would be a waste of code.
Attachment:
alt-blit.c.diff.gz
Description: GNU Zip compressed data
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |