Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

Dir     : e17/libs/evas/src/lib/canvas


Modified Files:
        evas_clip.c evas_events.c evas_object_gradient.c 
        evas_object_image.c evas_object_line.c evas_object_main.c 
        evas_object_polygon.c evas_object_rectangle.c 
        evas_object_text.c evas_object_textblock.c evas_render.c 


Log Message:


optimisipoos. (e17's menus should be more responsive now)

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/canvas/evas_clip.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- evas_clip.c 20 Jan 2005 06:54:44 -0000      1.11
+++ evas_clip.c 3 Apr 2005 14:22:16 -0000       1.12
@@ -17,7 +17,8 @@
    cb = obj->cur.color.b; ca = obj->cur.color.a;
    if (obj->cur.clipper)
      {
-       evas_object_clip_recalc(obj->cur.clipper);
+       if (obj->cur.clipper->cur.cache.clip.dirty)
+         evas_object_clip_recalc(obj->cur.clipper);
        nx = obj->cur.clipper->cur.cache.clip.x;
        ny = obj->cur.clipper->cur.cache.clip.y;
        nw = obj->cur.clipper->cur.cache.clip.w;
@@ -44,17 +45,29 @@
    obj->cur.cache.clip.g = cg;
    obj->cur.cache.clip.b = cb;
    obj->cur.cache.clip.a = ca;
+   obj->cur.cache.clip.dirty = 0;
 }
 
 void
-evas_object_recalc_clippees(Evas_Object *obj)
+evas_object_clip_dirty(Evas_Object *obj)
 {
    Evas_List *l;
    
-   evas_object_clip_recalc(obj);   
+   obj->cur.cache.clip.dirty = 1;
    for (l = obj->clip.clipees; l; l = l->next)
+     evas_object_clip_dirty(l->data);
+}
+
+void
+evas_object_recalc_clippees(Evas_Object *obj)
+{
+   Evas_List *l;
+   
+   if (obj->cur.cache.clip.dirty)
      {
-       evas_object_recalc_clippees(l->data);
+       evas_object_clip_recalc(obj);
+       for (l = obj->clip.clipees; l; l = l->next)
+         evas_object_recalc_clippees(l->data);
      }
 }
 
@@ -178,6 +191,7 @@
    obj->cur.clipper = clip;
    clip->clip.clipees = evas_list_append(clip->clip.clipees, obj);
    evas_object_change(obj);
+   evas_object_clip_dirty(obj);
    evas_object_recalc_clippees(obj);
    if (!obj->smart.smart)
      {
@@ -264,6 +278,7 @@
    obj->cur.clipper->clip.clipees = 
evas_list_remove(obj->cur.clipper->clip.clipees, obj);
    obj->cur.clipper = NULL;
    evas_object_change(obj);
+   evas_object_clip_dirty(obj);
    evas_object_recalc_clippees(obj);
    if (!obj->smart.smart)
      {
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/canvas/evas_events.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -3 -r1.31 -r1.32
--- evas_events.c       30 Jan 2005 11:41:00 -0000      1.31
+++ evas_events.c       3 Apr 2005 14:22:16 -0000       1.32
@@ -31,7 +31,8 @@
             if (obj == stop) goto done;
             if ((!evas_event_passes_through(obj)) && (!obj->smart.smart))
               {
-                 evas_object_clip_recalc(obj);
+// FIXME: i don't think we need this             
+//               evas_object_clip_recalc(obj);
                  if ((evas_object_is_in_output_rect(obj, x, y, 1, 1)) &&
                      (obj->cur.visible) &&
                      (obj->delete_me == 0) &&
@@ -462,7 +463,8 @@
             obj = l->data;
             /* if its under the pointer and its visible and its in the new */
             /* in list */
-            evas_object_clip_recalc(obj);
+// FIXME: i don't think we need this        
+//          evas_object_clip_recalc(obj);
             if (evas_object_is_in_output_rect(obj, x, y, 1, 1) && 
                 (obj->cur.visible) &&
                 (evas_object_clippers_is_visible(obj)) &&
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/evas/src/lib/canvas/evas_object_gradient.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- evas_object_gradient.c      16 Aug 2004 05:13:25 -0000      1.6
+++ evas_object_gradient.c      3 Apr 2005 14:22:16 -0000       1.7
@@ -310,7 +310,8 @@
    /* if someone is clipping this obj - go calculate the clipper */
    if (obj->cur.clipper)
      {
-       evas_object_clip_recalc(obj->cur.clipper);
+       if (obj->cur.cache.clip.dirty)
+         evas_object_clip_recalc(obj->cur.clipper);
        obj->cur.clipper->func->render_pre(obj->cur.clipper);
      }
    /* now figure what changed and add draw rects */
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/evas/src/lib/canvas/evas_object_image.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -3 -r1.24 -r1.25
--- evas_object_image.c 1 Apr 2005 16:12:09 -0000       1.24
+++ evas_object_image.c 3 Apr 2005 14:22:16 -0000       1.25
@@ -1484,7 +1484,8 @@
    /* if someone is clipping this obj - go calculate the clipper */
    if (obj->cur.clipper)
      {
-       evas_object_clip_recalc(obj->cur.clipper);
+       if (obj->cur.cache.clip.dirty)
+         evas_object_clip_recalc(obj->cur.clipper);
        obj->cur.clipper->func->render_pre(obj->cur.clipper);
      }
    /* now figure what changed and add draw rects */
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/evas/src/lib/canvas/evas_object_line.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- evas_object_line.c  14 Dec 2004 03:21:32 -0000      1.10
+++ evas_object_line.c  3 Apr 2005 14:22:16 -0000       1.11
@@ -301,7 +301,8 @@
    /* if someone is clipping this obj - go calculate the clipper */
    if (obj->cur.clipper)
      {
-       evas_object_clip_recalc(obj->cur.clipper);
+       if (obj->cur.cache.clip.dirty)
+         evas_object_clip_recalc(obj->cur.clipper);
        obj->cur.clipper->func->render_pre(obj->cur.clipper);
      }
    /* now figure what changed and add draw rects */
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/evas/src/lib/canvas/evas_object_main.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -3 -r1.26 -r1.27
--- evas_object_main.c  30 Jan 2005 10:22:47 -0000      1.26
+++ evas_object_main.c  3 Apr 2005 14:22:16 -0000       1.27
@@ -476,6 +476,7 @@
    obj->cur.geometry.y = y;
    obj->cur.cache.geometry.validity = 0;
    evas_object_change(obj);
+   evas_object_clip_dirty(obj);
    evas_object_recalc_clippees(obj);
    if (!evas_event_passes_through(obj))
      {
@@ -531,6 +532,7 @@
    obj->cur.geometry.h = h;
    obj->cur.cache.geometry.validity = 0;
    evas_object_change(obj);
+   evas_object_clip_dirty(obj);
    evas_object_recalc_clippees(obj);
 //   if (obj->func->coords_recalc) obj->func->coords_recalc(obj);
    if (!evas_event_passes_through(obj))
@@ -616,6 +618,7 @@
      }
    obj->cur.visible = 1;
    evas_object_change(obj);
+   evas_object_clip_dirty(obj);
    evas_object_recalc_clippees(obj);
    if (!evas_event_passes_through(obj))
      {
@@ -658,6 +661,7 @@
      }
    obj->cur.visible = 0;
    evas_object_change(obj);
+   evas_object_clip_dirty(obj);
    evas_object_recalc_clippees(obj);
    if (!evas_event_passes_through(obj))
      {   
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/evas/src/lib/canvas/evas_object_polygon.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- evas_object_polygon.c       14 Dec 2004 03:21:32 -0000      1.10
+++ evas_object_polygon.c       3 Apr 2005 14:22:16 -0000       1.11
@@ -321,7 +321,8 @@
    /* if someone is clipping this obj - go calculate the clipper */
    if (obj->cur.clipper)
      {
-       evas_object_clip_recalc(obj->cur.clipper);
+       if (obj->cur.cache.clip.dirty)
+         evas_object_clip_recalc(obj->cur.clipper);
        obj->cur.clipper->func->render_pre(obj->cur.clipper);
      }
    /* now figure what changed and add draw rects */
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/evas/src/lib/canvas/evas_object_rectangle.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- evas_object_rectangle.c     23 Aug 2004 23:04:34 -0000      1.4
+++ evas_object_rectangle.c     3 Apr 2005 14:22:16 -0000       1.5
@@ -172,7 +172,8 @@
    /* if someone is clipping this obj - go calculate the clipper */
    if (obj->cur.clipper)
      {
-       evas_object_clip_recalc(obj->cur.clipper);
+       if (obj->cur.cache.clip.dirty)
+         evas_object_clip_recalc(obj->cur.clipper);
        obj->cur.clipper->func->render_pre(obj->cur.clipper);
      }
    /* now figure what changed and add draw rects */
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/evas/src/lib/canvas/evas_object_text.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -3 -r1.35 -r1.36
--- evas_object_text.c  1 Apr 2005 07:14:15 -0000       1.35
+++ evas_object_text.c  3 Apr 2005 14:22:16 -0000       1.36
@@ -895,7 +895,8 @@
    /* if someone is clipping this obj - go calculate the clipper */
    if (obj->cur.clipper)
      {
-       evas_object_clip_recalc(obj->cur.clipper);
+       if (obj->cur.cache.clip.dirty)
+         evas_object_clip_recalc(obj->cur.clipper);
        obj->cur.clipper->func->render_pre(obj->cur.clipper);
      }
    /* now figure what changed and add draw rects */
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/evas/src/lib/canvas/evas_object_textblock.c,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -3 -r1.53 -r1.54
--- evas_object_textblock.c     1 Apr 2005 07:14:15 -0000       1.53
+++ evas_object_textblock.c     3 Apr 2005 14:22:16 -0000       1.54
@@ -3628,7 +3628,8 @@
    /* if someone is clipping this obj - go calculate the clipper */
    if (obj->cur.clipper)
      {
-       evas_object_clip_recalc(obj->cur.clipper);
+       if (obj->cur.cache.clip.dirty)
+         evas_object_clip_recalc(obj->cur.clipper);
        obj->cur.clipper->func->render_pre(obj->cur.clipper);
      }
    /* now figure what changed and add draw rects */
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/canvas/evas_render.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- evas_render.c       16 Feb 2004 19:22:48 -0000      1.6
+++ evas_render.c       3 Apr 2005 14:22:17 -0000       1.7
@@ -103,7 +103,8 @@
             Evas_Object *obj;
             
             obj = (Evas_Object *)l2;
-            evas_object_clip_recalc(obj);
+//          if (obj->cur.cache.clip.dirty)
+              evas_object_clip_recalc(obj);
             /* build active object list */
             if (evas_object_is_active(obj))
               active_objects = evas_list_append(active_objects, obj);




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to