Tasos Parisinos wrote:
> I'm creating a gui API based on directfb to be used in embedded systems
> and mainly with avr32 (at least for the beginning)

I need to get one of those as well... :)

> I have a port of directfb and my lib on the stk1000 (one of the avr32 
> development boards)
> and on my x86 laptop.
> 
> I'm using alpha channel blending on all surfaces. I had some lagging 
> issues on the avr32
> on a tft screen 320x240 32bpp, that i thought where due to low 
> computational power
> of the avr32

Do you really need blending all the time?

At least the AVR32 has SIMD instructions like MMX that could be used.

If you're using an RGB16 or RGB32 destination surface and an ARGB source
it should be faster, using a simple C function combining all stages that
would run one after another on a temporary buffer.

It could be added for ARGB destinations, too.

Look at Bop_argb_blend_alphachannel_src_invsrc_Aop_rgb16
and Bop_argb_blend_alphachannel_src_invsrc_Aop_rgb32
in src/gfx/generic/generic.c:6104:

> When i ported things on my x86 (pentium M ~2GHz, ATI Mobility radeon 
> 128Mb) and
> tried to blit big surfaces on my 1280x800 resolution i understood that 
> alpha-channel
> blending blit IS a heavy operation.

Did you run df_dok from DirectFB-examples to check the driver?

> To be more exact i used two surfaces the one blitted onto the other of a 
> size of 800x800
> pixels approximately, even using color premultiplication as shown on the 
> directfb blitting howto wiki
> but the blit takes a fraction of a second. I mean if you where to drag 
> the second surface on a desktop
> surface for example, using 8bit alpha things seem that they would be 
> very laggy.
> But i've seen screenshots of desktop enviroments that use the 
> transparencies. Are these implementation
> exploiting gfx or any software accels?

You can do quite fast blending in system memory with a CPU of 2 GHz,
but if you blend directly onto video memory it's always very slow,
maybe 1/10th of the performance.

If you use CreateSurface() with DSCAPS_PRIMARY and DSCAPS_FLIPPING, you
can also set DSCAPS_SYSTEMONLY to have the back buffer in system memory.

If you use the display layer API you can set the buffer mode to
DLBM_BACKSYSTEM.

It will be a lot faster than FRONTONLY, BACKVIDEO or TRIPLE.

-- 
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