|
From: Geert U. <ge...@li...> - 2002-07-05 07:42:19
|
On Thu, 4 Jul 2002, James Simmons wrote:
> > Other comments/notes:
> > - Shouldn't cfb_fillrect() use the pseudo_palette in DIRECTCOLOR mode?
>
> ??? I thought you had to go threw the DAC to get values.
Yes, but you have to do that for _each_ color component. So you have to use
pixel value (i, i, i), not (0, 0, i) (depending on the order of the components)
like the current code does.
> > - I think the cfb_*() routines can easily be modified to work for bpp < 8,
> > and for bpp == 24:
>
> It doesn't work for bpp < 4 for you? It should work for those as well. Bpp
Note that I didn't try that.
> 24 is a bit more trick if we want to do word align access to the
> framebuffer.
>
> > o initialize src/dst indices to be bit indices instead of byte indices
> > o remove shifts by 3
> > o n is number of bits to copy/fill
>
> Hm. I have to work up so psuedo code to try that idea out.
The main idea is to do an optimized bitcopy, not a bytecopy. Then it works for
all values of bpp:
void bitcpy(unsigned long *dst, int dst_idx, unsigned long *src,
int src_idx, int nbits);
{dst,src}_idx are bit indices (0 == MSB, 31 or 63 = LSB), nbits is the number
of bits to copy.
The same is true for fillrect, there you want an optimized bitset().
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
|