[Splashy-devel] DirectFB, SetBackgroundImage

Luis lemsx1 at gmail.com
Thu Sep 14 19:18:48 UTC 2006


On 9/14/06, Pat Suwalski <pats at xandros.com> wrote:
> Luis wrote:
> > In a two-layer setup, we would be able to write our background image
> > in a lower layer (say primary) and then do an overlay that has the
> > progressbar and our textbox. But in reality this doesn't work well for
> > everybody as not all video cards support multi-layers. At least this
> > is my understanding on this. Pat (from Xandros) would be able to
> > expand on this...
>
> As I recall, it wasn't that the drivers didn't support multiple layers,
> just that some of the drivers did not support alpha in layers.

Ah, thanks for that. I wasn't sure about why we did this. There might
be a comment somewhere in the code or the emails we sent. But poking
at your memory is more fun :-P

At least the alpha effect looked nicer than the opacity level one we
are using... it was just too slow. I wonder if there is another way of
doing this so that it looks good and is also fast...

> You want the progress bar in a separate layer for the progress bar than
> the text box, as the text box layer is optimized to be the exact size of
> the area it's assigned to. You want separate origin points, too, since
> it makes placing the text much simpler.

Yeah, the progressbar can stay in the same primary layer as this is
regularly moving in one direction at a time and it simply "taints" the
layer below. The textbox is the one that needs to be in it's own layer
or window because of the text that gets printed on it. Thanks again
for the explanation.

Now, Otavio, I don't think that using a border-less window makes the
code any simpler than without it. It was just something we needed to
initialized for directfb to understand that the opacity levels should
be set for the primary layer. And in order to set those parameters,
the dfb object needed to be created using a particular routine (3 or
so lines of code). Not a big deal. From then on we never actually talk
to the window itself, as we have a pointer to the primary layer
accessible at all times.

In summary, we should leave the code as is, unless we find a better
way to make the fade effect look nicer (and work faster). People who
don't care about the fade effect can always turn it off in their own
theme.xml files.

-- 
----)(-----
Luis Mondesi
*NIX Guru

Kiskeyix.org

"We think basically you watch television to turn your brain off, and
you work on your computer when you want to turn your brain on" --
Steve Jobs in an interview for MacWorld Magazine 2004-Feb

No .doc: http://www.gnu.org/philosophy/no-word-attachments.es.html



More information about the Splashy-devel mailing list