Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

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


Modified Files:
        Makefile.am evas_draw_main.c evas_tiler.c 
Added Files:
        evas_regionbuf.c 


Log Message:


i worked on a regionbuf set of code (exact rectangles). i THINK it has some
bugs... but its disabled right now and it didnt speed anything up :( but it's
there for perusal and later work anyway...

===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/evas/src/lib/engines/common/Makefile.am,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- Makefile.am 22 Oct 2004 02:38:30 -0000      1.9
+++ Makefile.am 5 Feb 2005 02:30:12 -0000       1.10
@@ -46,6 +46,7 @@
 evas_scale_sample.c \
 evas_scale_smooth.c \
 evas_tiler.c \
+evas_regionbuf.c \
 evas_blend_ops.h
 
 EXTRA_DIST = \
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/evas/src/lib/engines/common/evas_draw_main.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- evas_draw_main.c    26 May 2004 02:45:40 -0000      1.9
+++ evas_draw_main.c    5 Feb 2005 02:30:12 -0000       1.10
@@ -496,6 +496,47 @@
        return out;
      }
    return NULL;
+#undef INX1
+#undef INX2
+#undef SPX1
+#undef SPX2
+#undef INY1
+#undef INY2
+#undef SPY1
+#undef SPY2
+#undef X1_IN
+#undef X2_IN
+#undef Y1_IN
+#undef Y2_IN
+#undef R_NEW
+}
+
+Cutout_Rect *
+evas_common_draw_context_cutout_merge(Cutout_Rect *in, Cutout_Rect *merge)
+{
+   /* 1 input rect, multiple out */
+   Cutout_Rect *out;
+   Cutout_Rect *r;
+   Evas_Object_List *l;
+
+   for (l = (Evas_Object_List *)in; l; l = l->next)
+     {
+       r = (Cutout_Rect *)l;
+
+       merge = evas_common_draw_context_cutouts_split(merge, r);
+       if (!merge) return in;
+     }
+   r = merge;
+   out = in;
+   while (r)
+     {
+       Cutout_Rect *r2;
+       
+       r2 = r;
+       r = evas_object_list_remove(r, r);
+       out = evas_object_list_append(out, r2);
+     }
+   return out;
 }
 
 Gfx_Func_Blend_Src_Dst
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/evas/src/lib/engines/common/evas_tiler.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- evas_tiler.c        14 Nov 2002 05:38:10 -0000      1.2
+++ evas_tiler.c        5 Feb 2005 02:30:13 -0000       1.3
@@ -2,9 +2,12 @@
 
 #define TILE(tb, x, y) ((tb)->tiles.tiles[((y) * (tb)->tiles.w) + (x)])
 
+#ifdef RECTUPDATE
+#else
 static int  tilebuf_x_intersect(Tilebuf *tb, int x, int w, int *x1, int *x2, 
int *x1_fill, int *x2_fill);
 static int  tilebuf_y_intersect(Tilebuf *tb, int y, int h, int *y1, int *y2, 
int *y1_fill, int *y2_fill);
 static int  tilebuf_intersect(int tsize, int tlen, int tnum, int x, int w, int 
*x1, int *x2, int *x1_fill, int *x2_fill);
+#endif
 static void tilebuf_setup(Tilebuf *tb);
 
 void
@@ -31,7 +34,11 @@
 void
 evas_common_tilebuf_free(Tilebuf *tb)
 {
+#ifdef RECTUPDATE
+   evas_common_regionbuf_free(tb->rb);
+#else   
    if (tb->tiles.tiles) free(tb->tiles.tiles);
+#endif   
    free(tb);
 }
 
@@ -126,6 +133,13 @@
 int
 evas_common_tilebuf_add_redraw(Tilebuf *tb, int x, int y, int w, int h)
 {
+#ifdef RECTUPDATE
+   int i;
+   
+   for (i = 0; i < h; i++)
+     evas_common_regionbuf_span_add(tb->rb, x, x + w - 1, y + i);
+   return 1;
+#else   
    int tx1, tx2, ty1, ty2, tfx1, tfx2, tfy1, tfy2, xx, yy;
    int num;
    
@@ -148,11 +162,18 @@
          }
      }
    return num;
+#endif   
 }
 
 int
 evas_common_tilebuf_del_redraw(Tilebuf *tb, int x, int y, int w, int h)
 {
+#ifdef RECTUPDATE
+   int i;
+   
+   for (i = 0; i < h; i++)
+     evas_common_regionbuf_span_del(tb->rb, x, x + w - 1, y + i);
+#else   
    int tx1, tx2, ty1, ty2, tfx1, tfx2, tfy1, tfy2, xx, yy;
    int num;
    
@@ -179,6 +200,7 @@
          }
      }
    return num;
+#endif   
 }
 
 int
@@ -198,13 +220,20 @@
 void
 evas_common_tilebuf_clear(Tilebuf *tb)
 {
+#ifdef RECTUPDATE
+   evas_common_regionbuf_clear(tb->rb);
+#else   
    if (!tb->tiles.tiles) return;
    memset(tb->tiles.tiles, 0, tb->tiles.w * tb->tiles.h * 
sizeof(Tilebuf_Tile));
+#endif   
 }
 
 Tilebuf_Rect *
 evas_common_tilebuf_get_render_rects(Tilebuf *tb)
 {
+#ifdef RECTUPDATE
+   return evas_common_regionbuf_rects_get(tb->rb);
+#else   
    Tilebuf_Rect *rects = NULL;
    int x, y;
    
@@ -269,6 +298,7 @@
          }
      }
    return rects;
+#endif   
 }
 
 void
@@ -295,6 +325,9 @@
 static void
 tilebuf_setup(Tilebuf *tb)
 {
+#ifdef RECTUPDATE
+   tb->rb = evas_common_regionbuf_new(tb->outbuf_w, tb->outbuf_h);
+#else   
    if (tb->tiles.tiles) free(tb->tiles.tiles);
    tb->tiles.tiles = NULL;
  
@@ -310,8 +343,11 @@
        return;
      }
    memset(tb->tiles.tiles, 0, tb->tiles.w * tb->tiles.h * 
sizeof(Tilebuf_Tile));
+#endif   
 }
 
+#ifdef RECTUPDATE
+#else
 static int
 tilebuf_x_intersect(Tilebuf *tb, int x, int w, int *x1, int *x2, int *x1_fill, 
int *x2_fill)
 {
@@ -359,3 +395,4 @@
    return 1;
    tnum = 0;
 }
+#endif




-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to