Hi Tasos,
you sure that your driver is being used for the blending blit?
If you haven't specified blending as a capability of your driver, DirectFB will simply use software fallback for blending.

Greets
Niels

Tasos Parisinos wrote:
Hi devels

I fixed the problem with the direct_memcpy call. You were right. It had to do with faulty pointer arithmetics. I now call:

bool sciensis_blit(
   void *drv_data,
   void *dev_data,
   DFBRectangle *rect,
   i32 dx,
   i32 dy
)
{
   u8 *dst, *src;
   u32 i, j;
   sciensis_drv_data *scdrv = (sciensis_drv_data *) drv_data;
   sciensis_dev_data *scdev = (sciensis_dev_data *) dev_data;

   /* Software blit/blend implementation */
   dst = scdev->dst_addr + dy * scdev->dst_pitch;
   dst += DFB_BYTES_PER_LINE(scdev->dst_fmt, dx);

   src = scdev->src_addr + rect->y * scdev->src_pitch;
   src += DFB_BYTES_PER_LINE(scdev->src_fmt, rect->x);

   while (rect->h--) {
       memcpy(dst, src, rect->w * scdev->dst_bpp);
       dst += scdev->dst_pitch;
       src += scdev->src_pitch;
   }

   return true;
}


That works fine. This is called when the blit is done with alphachannel blend and i do see blended surfaces. What i don't understand is this:

memcpy raw copies the src buffer to the dst buffer. So where is the blending done? I use surfaces where the dst and src colors are not premultiplicated. What i want to do is to have the raw surface data in order to implement the SRC_OVER method all on my own (in order to hardware accelerate it using an MMX-like mechanism)

Best regards
Tasos Parisinos

_______________________________________________
directfb-dev mailing list
directfb-dev@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev



--

.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/                 |
"------------------------------------------"
_______________________________________________
directfb-dev mailing list
directfb-dev@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to