Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

Dir     : e17/libs/evas/src/lib/engines/xrender_x11


Modified Files:
        evas_engine_xrender.c 


Log Message:


be more paranoid about poly point array and lines.

===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/evas/src/lib/engines/xrender_x11/evas_engine_xrender.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- evas_engine_xrender.c       3 Oct 2005 03:34:21 -0000       1.2
+++ evas_engine_xrender.c       3 Oct 2005 15:49:45 -0000       1.3
@@ -321,31 +321,6 @@
        rect.width = dc->clip.w; rect.height = dc->clip.h;
        XRenderSetPictureClipRectangles(rs->xinf->disp, rs->pic, 0, 0, &rect, 
1);
      }
-   if ((y1 == y2) || (x1 == x2))
-     {
-       XRenderColor col;
-       int r, g, b, a, aa;
-       
-       a = (dc->col.col >> 24) & 0xff;
-       if (a == 0) return;
-       if (a < 0xff) op = PictOpOver;
-       r = (dc->col.col >> 16) & 0xff;
-       g = (dc->col.col >> 8 ) & 0xff;
-       b = (dc->col.col      ) & 0xff;
-       aa = a +1;
-       r = (r * aa) >> 8;
-       g = (g * aa) >> 8;
-       b = (b * aa) >> 8;
-       col.red   = (r << 8) | r;
-       col.green = (g << 8) | g;
-       col.blue  = (b << 8) | b;
-       col.alpha = (a << 8) | a;
-       if (y1 == y2)
-         XRenderFillRectangle(rs->xinf->disp, op, rs->pic, &col, x1, y1, x2 - 
x1 + 1, 1);
-       else
-         XRenderFillRectangle(rs->xinf->disp, op, rs->pic, &col, x1, y1, 1, y2 
- y1 + 1);
-     }
-   else
      {
        int r, g, b, a;
        XPointDouble poly[4];
@@ -423,9 +398,12 @@
    i = 0;
    for (pt = points; pt; pt = (RGBA_Polygon_Point *)(((Evas_Object_List 
*)pt)->next))
      {
-       pts[i].x = pt->x;
-       pts[i].y = pt->y;
-       i++;
+       if (i < num)
+         {
+            pts[i].x = pt->x;
+            pts[i].y = pt->y;
+            i++;
+         }
      }
    rect.x = 0; rect.y = 0; rect.width = rs->w; rect.height = rs->h;
    att.clip_mask = None;




-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to