Re: [AD] Windowed drivers color conversion |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
> The port is getting more stable, and now I can run all the library
> programs and examples...
Great !
> The X and BeOS windowed drivers use a buffered technique and update
> the real display on a line basis. They use a blitter function that's
> choosen at startup time (and can change on BeOS as there you can
> change desktop color depth while running your programs) to do the
> color conversion for a line in the buffer (using the color depth specified
> in the program) to display it on the screen.
Same mechanism under Windows: per line basis (but the code works for any
rectangular area) and blitter function selected at startup.
> This color conversion system takes a lot of code in both bgfxapi.cpp and
> xwin.c;
For the Windows port, the file update.s takes 42 ko (asm though) !
> as I'd need almost the same thing also for QNX, I was wondering if
> we could place it on a separated file, say "src/colconv.c", and make an
> unique API for windowed drivers color conversion...
The Windows color conversion code is in asm, with a pure 386 version (all
colors) and a MMX enhanced version (no 24-bit support).
When I was planning to write the non MMX code, I made some C vs asm
comparison tests (C routines derived from Michael's X code): on my P200 (non
MMX), the asm code was roughly twice as fast as the C code in some cases
(Mingw32, compiled with -O2 -mpentium).
--
Eric Botcazou
ebotcazou@xxxxxxxxxx