Daniel Laird wrote:
> When I try to use Directfb I have found a problem with blitting in 
> src/core/gfxcard.c
> 
>  
> 
> *** 1367,1376 ****
> --- 1367,1378 ----
>             dfb_state_set_color( &font->state, &state->color );
>  
>        /* additional blending? */
>        if ((state->drawingflags & DSDRAW_BLEND) && (state->color.a != 0xff))
>             flags |= DSBLIT_BLEND_COLORALPHA;
> +      else
> +           flags &= ~DSBLIT_BLEND_COLORALPHA;
>  
>        if (state->drawingflags & DSDRAW_DST_COLORKEY) {
>             flags |= DSBLIT_DST_COLORKEY;
>             dfb_state_set_dst_colorkey( &font->state, state->dst_colorkey );
>        }
> 
> This patch was on Directfb 0.9.24 but I found that that if I did not 
> have the else that the blending did not work properly.  Anyone any 
> thoughts on this?  If people think the patch is ok then i will move it 
> on to 0.9.25.1 and get it in!

The original flags come from the font module, so if it specifies
DSBLIT_BLEND_COLORALPHA, it shouldn't be removed. But in this case
the flag was set by the application and indeed isn't cleared properly.
The solution is to keep the original flags from the module somewhere
and use that as a basis for the above code instead of the previous
flags.

-- 
Best regards,
   Denis Oliver Kropp

.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/                 |
"------------------------------------------"

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

Reply via email to