On Dienstag 20 Juni 2006 10:24, Claudio Ciccani wrote:
> Stefan Lucke wrote:

> > 
> > 
> > I would not say that specifying DLOP_ALPHACHANNEL should change the level.
> > 
> > With DirectFB the same functionality for two different cards has to be done
> > in two different ways. That's what I don't like. I'm comparing now 
> > VIA-unichrome
> > and ATI-radeon. I can show something on the video layer and an OSD. The OSD
> > seems to be on top of the videolayer. OSD is drawn on graphic layer and 
> > holds
> > the alpha values for full alpha blending. The argumentation for unichrome 
> > was:
> > to get this mode you have to videolayer->Setlevel(-1) [below graphic layer] 
> > and
> > enable DLOP_ALPHACHANNEL on graphic layer ;-) .
> > 
> > 
> 
> That's the right way to do that since, after enabling 
> DISP_ALPHA_MODE_PER_PIXEL,
> the overlay becomes the underlay and the underlay becomes the OSD.
> 
> Another way could be adding a new layer ("Radeon OSD" or "Radeon Subpicture")
> that wraps the primary layer, but I will follow the unichrome approach for 
> now.
> 

Nice that it works a similar way than unichrome. But I had some difficulties:
It froced that video layer SetLevel(-1) has to be done, _before_ 
DLOP_ALPHACHANNEL
could be set on graphic primary layer :-( . I guess setting DLOP_ALPHACHANNEL
should only cause an error if config->format has no alpha component independant
of video layer level.

>From radeon_crtc1.c:

     if (ovlevel < 0) {
          if (config->options & DLOP_ALPHACHANNEL && 
              config->format != DSPF_ARGB)
               fail |= CLRCF_OPTIONS;
     }
     else {
          if (config->options & DLOP_ALPHACHANNEL)
               fail |= CLRCF_OPTIONS;
     }
     
     if (failed)
          *failed = fail;
          
     return fail ? DFB_UNSUPPORTED : DFB_OK;

-- 
Stefan Lucke

_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to