Re: How to shift color bits in fbdev?

2009-03-16 Thread Michel Dänzer
On Son, 2009-03-15 at 11:08 -0700, Gregoire Gentil wrote: - the background is still with a darken opacity - the problem around the transparent icons have disappeared - the png background of the bottom panel has the exact perfect colors (no opacity problem) and it's a complex png shading

Re: How to shift color bits in fbdev?

2009-03-16 Thread Gregoire Gentil
Michel, Problem fixed. Patching the line *win++ = (*sha++)2; in shadowUpdatePacked of shpacked.c made the trick. It was just adding three characters! Many thanks to Maarten and Daniel for their help though I didn't manage to make it work with wfb. I don't know what I'm doing wrong on this patch

Re: How to shift color bits in fbdev?

2009-03-15 Thread Gregoire Gentil
Maarten, Thanks again for your answer. I'm close as I have some parts of the screen with the right colors but not all! More precisely: - the background is still with a darken opacity - the problem around the transparent icons have disappeared - the png background of the bottom panel has the

Re: How to shift color bits in fbdev?

2009-03-14 Thread Gregoire Gentil
Maarten, Daniel, Thanks for your answers. Yes, wfb is what I need for my temporary solution. And it works as you advertise it without too much complexity of implementation. That's great! I include the patch below in case somebody wants to do something similar in the future. Now, I'm still unsure

Re: How to shift color bits in fbdev?

2009-03-14 Thread Maarten Maathuis
Several things i see. 1: you are throwing away bits in the colors 2: you should undo the mangling in the read function (the system doesn't understand your strange layout) 3: the alpha channel is in the upper 8 bits on little endian systems (typically) for A8R8G8B 4: read/write are used by more

How to shift color bits in fbdev?

2009-03-13 Thread Gregoire Gentil
Hello, I'm using fbdev with xorg on a hardware prototype and unfortunately, the video wires at the output of the chip have been mixed and swapped. To make it work properly on this proto (I can't afford to do immediately another revision), I need to shift and swap some bits for each RGB24 pixel.

Re: How to shift color bits in fbdev?

2009-03-13 Thread Maarten Maathuis
You could hack wrapped fb support into the fbdev driver, but that will only work for software rendering in X. And you'll loose some performance because every pixel access goes through a wrapper The vermillion driver has a simple wfb implementation