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:


zero out alpha only if we have it - and add an initial memset to 0.

===================================================================
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/buffer/evas_outbuf.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- evas_outbuf.c       23 Jan 2006 07:57:30 -0000      1.2
+++ evas_outbuf.c       2 Apr 2006 01:33:00 -0000       1.3
@@ -52,6 +52,7 @@
        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))))
@@ -77,14 +78,17 @@
    if (buf->priv.back_buf)
      {
        *cx = x; *cy = y; *cw = w; *ch = h;
-       for (yy = 0; yy < h; yy++)
+       if (buf->priv.back_buf->flags & RGBA_IMAGE_HAS_ALPHA)
          {
-            ptr = buf->priv.back_buf->image->data +
-              ((y + yy) * buf->priv.back_buf->image->w) + x;
-            for (xx = 0; xx < w; xx++)
+            for (yy = 0; yy < h; yy++)
               {
-                 A_VAL(ptr) = 0;
-                 ptr++;
+                 ptr = buf->priv.back_buf->image->data +
+                   ((y + yy) * buf->priv.back_buf->image->w) + x;
+                 for (xx = 0; xx < w; xx++)
+                   {
+                      A_VAL(ptr) = 0;
+                      ptr++;
+                   }
               }
          }
        return buf->priv.back_buf;




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