Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

Dir     : e17/libs/evas/src/modules/engines/buffer


Modified Files:
        evas_outbuf.c 


Log Message:


cvlear ALL dst buffers for buffer engine

===================================================================
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/buffer/evas_outbuf.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- evas_outbuf.c       2 Apr 2006 01:33:00 -0000       1.3
+++ evas_outbuf.c       2 Apr 2006 07:25:03 -0000       1.4
@@ -24,7 +24,9 @@
                                )
 {
    Outbuf *buf;
-
+   int y;
+   int bpp;
+   
    buf = calloc(1, sizeof(Outbuf));
    if (!buf) return NULL;
 
@@ -42,6 +44,13 @@
    buf->func.new_update_region = new_update_region;
    buf->func.free_update_region = free_update_region;
 
+   bpp = sizeof(DATA32);
+   if ((buf->depth == OUTBUF_DEPTH_RGB_24BPP_888_888) ||
+       (buf->depth == OUTBUF_DEPTH_BGR_24BPP_888_888))
+     bpp = 3;
+   for (y = 0; y < h; y++)
+     memset(((unsigned char *)(buf->dest)) + (y * buf->dest_row_bytes), 
+           0, w * bpp);
    if ((buf->depth == OUTBUF_DEPTH_ARGB_32BPP_8888_8888) &&
        (buf->dest) && (buf->dest_row_bytes == (buf->w * sizeof(DATA32))))
      {
@@ -52,7 +61,6 @@
        buf->priv.back_buf->image->data = buf->dest;
        buf->priv.back_buf->image->no_free = 1;
        buf->priv.back_buf->flags |= RGBA_IMAGE_HAS_ALPHA;
-       memset(buf->dest, 0, w * h * sizeof(DATA32));
      }
    else if ((buf->depth == OUTBUF_DEPTH_RGB_32BPP_888_8888) &&
        (buf->dest) && (buf->dest_row_bytes == (buf->w * sizeof(DATA32))))




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to