[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
> I think it should take pointers to functions which take line number
> and return pointer to the beginning of that line. Then these
> functions may call bank switching routines if necessary (it might be
> necessary for DGA driver).
>
> /* From one Allegro format to another Allegro format. */
> void update_bpp_to_bpp (unsigned char *(*get_src_line) (int line),
> unsigned char *(*get_dst_line) (int line),
> int x, int y, int w, int h);
Too complicated... Why don't perform bank switching out of these
functions? in Windows it's not necessary, and two calls to functions
for each line will be a huge overhead
> X driver support more destination formats than BeOS and Windows
> drivers. It uses up to 4 lookup tables to make necessary conversion
> from Allegro format to destination format, thus it avoids using shifts
> when destination is in truecolor format and it avoids searches for
> best color if destination is in some other format. These lookup
> tables are prepared in initialization and in set_palette (for 8bpp
> screen).
lookup tables are great if source or dest are 8 bit, but IMHO with for
example 16 to 32, it's better to use shifts than a table of 64K
entries, if using MMX you can convert 2/4/8 pixels at the same time
> I agree with this idea, but it will be necessary to supply generic C
> versions for any ASM routines, or it can not be used in X (some
> conditionals will be necessary to call generic functions instead of
> ASM ones).
These are easier :)
___________________________________________________________________
Consigue tu e-mail gratuito TERRA.ES
Haz click en http://www.terra.es/correo/