List Info

Thread: Re: DirectFB (unichrome alpha handling)




Re: DirectFB (unichrome alpha handling)
user name
2007-01-25 17:12:20
On Donnerstag 25 Januar 2007 22:30, Ville Syrjälä wrote: > On Thu, Jan 25, 2007 at 06:54:02PM +0000, Mark Adams wrote: > > > But now I've a real strange situation: > > > For clearing the OSD (full transparent) I've to use Clear(r, b, g, a) with > > > Clear(0, 0, 0, 0) which is "normal" transparent black. > > > > > > But for OSD drawing into the surface I've to invert alpha: > > > transparent black is (0, 0, 0, 0xff) solid black is (0, 0, 0, 0) . > > > > I was just looking into that, thinking it was probably an obvious typo > > on my part but I'm not sure it is. > > > > What's puzzling me is that > > > > Clear(r,g,b,a) > > > > is equivalent to > > > > SetColor(r,g,b,a) > > SetDrawingFlags(DSDRAW_NOFX) > > FillRectangle(...) > > > > If you're seeing a difference, I can only assume that you're using > > some other drawing flags, e.g. DSDRAW_BLEND. If that's the case then > > your drawing operations will be using the software fallback since we > > can't do hardware accelerated blending on AiRGB surfaces. > > > > So it looks to me like the problem is in the software renderer, which > > is not my area of expertise I'm afraid. > > I found a bug in AiRGB color handling in the sw rendering code, and > commited a fix to CVS. Stefan, let me know if the problem still > persists. Thanks, but no, the situation is still the same. To see video after OSD is closed, I still have to use (check for VIA should be dropped): /* --------------------------------------------------------------------- * In case of of AiRGB we have to reset clearAlpha value for VIA */ if (fmt == DSPF_AiRGB && isVIAUnichrome) clearAlpha = 0; And at OSD close (with: "#define COLORKEY 0,0,0") : tmpSurface->Clear(COLORKEY,clearAlpha); //clear and tmpSurface->Flip(); // Flip the field Same behaviour is shown when I use the following in ClearOSD(): //tmpSurface->Clear(COLORKEY,clearAlpha); //clear and tmpSurface->SetColor(COLORKEY,clearAlpha); tmpSurface->SetBlittingFlags(DSBLIT_NOFX); tmpSurface->FillRectangle(0,0, Xres, Yres); tmpSurface->Flip(); // Flip the field I guess thats an indicator (but no proove) that I'm _not_ using SW rendering for Clear() . -- Stefan Lucke _______________________________________________ directfb-dev mailing list directfb-devdirectfb.org http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev
Re: DirectFB (unichrome alpha handling)
user name
2007-01-25 17:27:55
On Fri, Jan 26, 2007 at 12:12:20AM +0100, Stefan Lucke wrote: > On Donnerstag 25 Januar 2007 22:30, Ville Syrjälä wrote: > > On Thu, Jan 25, 2007 at 06:54:02PM +0000, Mark Adams wrote: > > > > But now I've a real strange situation: > > > > For clearing the OSD (full transparent) I've to use Clear(r, b, g, a) with > > > > Clear(0, 0, 0, 0) which is "normal" transparent black. > > > > > > > > But for OSD drawing into the surface I've to invert alpha: > > > > transparent black is (0, 0, 0, 0xff) solid black is (0, 0, 0, 0) . > > > > > > I was just looking into that, thinking it was probably an obvious typo > > > on my part but I'm not sure it is. > > > > > > What's puzzling me is that > > > > > > Clear(r,g,b,a) > > > > > > is equivalent to > > > > > > SetColor(r,g,b,a) > > > SetDrawingFlags(DSDRAW_NOFX) > > > FillRectangle(...) > > > > > > If you're seeing a difference, I can only assume that you're using > > > some other drawing flags, e.g. DSDRAW_BLEND. If that's the case then > > > your drawing operations will be using the software fallback since we > > > can't do hardware accelerated blending on AiRGB surfaces. > > > > > > So it looks to me like the problem is in the software renderer, which > > > is not my area of expertise I'm afraid. > > > > I found a bug in AiRGB color handling in the sw rendering code, and > > commited a fix to CVS. Stefan, let me know if the problem still > > persists. > > Thanks, but no, the situation is still the same. > To see video after OSD is closed, I still have to use (check for VIA > should be dropped): > > /* --------------------------------------------------------------------- > * In case of of AiRGB we have to reset clearAlpha value for VIA > */ > if (fmt == DSPF_AiRGB && isVIAUnichrome) > clearAlpha = 0; > > > And at OSD close (with: "#define COLORKEY 0,0,0") : > tmpSurface->Clear(COLORKEY,clearAlpha); //clear and > tmpSurface->Flip(); // Flip the field > > Same behaviour is shown when I use the following in ClearOSD(): > //tmpSurface->Clear(COLORKEY,clearAlpha); //clear and > tmpSurface->SetColor(COLORKEY,clearAlpha); > tmpSurface->SetBlittingFlags(DSBLIT_NOFX); SetDrawingFlags(DSDRAW_NOFX)? > tmpSurface->FillRectangle(0,0, Xres, Yres); > tmpSurface->Flip(); // Flip the field These two methods (if you use DSDRAW_NOFX in the latter case) should provide identical results (and use the same code paths). Is that not the case? > I guess thats an indicator (but no proove) that I'm _not_ using > SW rendering for Clear() . You can use the no-hardware directfbrc option to force software rendering. -- Ville Syrjälä syrjalasci.fi http://www.sci.fi/~syrjala/ _______________________________________________ directfb-dev mailing list directfb-devdirectfb.org http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )