From: Geert U. <ge...@li...> - 2001-07-02 09:42:29
|
On Mon, 2 Jul 2001, Jeff Garzik wrote: > When implementing accels in kernel space, it would be nice to go ahead > and shove those into a library for userland apps to use as well. > "fbdev-lib" or whatever. Then, software such as gdk's fbdev backend or > qt's fbdev backend or Mesa's fbdev target could link against this > library, and automatically benefit from the code sharing (when new > hardware accels are implemented, especially). Good idea. But note that acceleration in kernel space will be limited to rectfill, rectcopy and perhaps monochrome bitmap expansion for text drawing. Of course these are the first things you want to accelerate in a userland application too. > It would also be nice to have other commonly-coded userland routines for > accessing Linux kernel fbdev devices, if such exist. You may want to take a look at fbtest (check out CVS at http://www.sf.net/projects/linux-fbdev/). It doesn't do acceleration, since that's chipset specific, but is supposed to handle whatever hardware you have and find possible bugs in a fbdev implementation. I did my best to keep everything as generic as possible. Speed is not the most important issue (but it is important), correctness is. It's built on a layered design: - Low-level drawing, for different video memory organizations (yes, you can get away with implementing [gs]etpixel only), using an opaque pixel value. - Visual handling, to map colors to an opaque pixel value. - Tests run on top of this. So far I ran it on pseudocolor/directcolor devices only, in cfb{8,16,24,32}. I have to run a test on my Amiga (planes) again. To do: - Add support for cfb{2,4} - Add more optimized routines for various video memory organizations - Add ellipse drawing, so I can mimic the fancy calibration image I once saw in a magazine - Add lots of new tests :-) Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@li... In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds |