* evas: fix rendering of object with color (*,*,*,0)
authorcedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 26 Sep 2010 16:10:59 +0000 (16:10 +0000)
committercedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 26 Sep 2010 16:10:59 +0000 (16:10 +0000)
and render_op != BLEND.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@52782 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/canvas/evas_object_main.c
src/lib/canvas/evas_render.c
src/lib/include/evas_inline.x

index 134c417..4213dae 100644 (file)
@@ -1257,7 +1257,7 @@ evas_object_color_set(Evas_Object *obj, int r, int g, int b, int a)
    obj->cur.color.g = g;
    obj->cur.color.b = b;
    evas_object_clip_dirty(obj);
-   if ((obj->cur.color.a == 0) && (a == 0)) return;
+   if ((obj->cur.color.a == 0) && (a == 0) && (obj->cur.render_op == EVAS_RENDER_BLEND)) return;
    obj->cur.color.a = a;
    evas_object_change(obj);
 }
index 8fb4bca..6e5add0 100644 (file)
@@ -1158,7 +1158,7 @@ evas_render_updates_internal(Evas *e,
                      (!obj->delete_me) &&
                      (obj->cur.cache.clip.visible) &&
 //                   (!obj->smart.smart) &&
-                     (obj->cur.color.a > 0))
+                     ((obj->cur.color.a > 0 || obj->cur.render_op != EVAS_RENDER_BLEND)))
                    {
                       int x, y, w, h;
 
index 18b8e88..193eb63 100644 (file)
@@ -12,7 +12,8 @@ evas_object_was_visible(Evas_Object *obj)
 {
    if ((obj->prev.visible) &&
        ((obj->prev.cache.clip.visible) || (obj->smart.smart)) &&
-       (obj->prev.cache.clip.a > 0))
+       ((obj->prev.cache.clip.a > 0 && obj->prev.render_op == EVAS_RENDER_BLEND)
+       || obj->prev.render_op != EVAS_RENDER_BLEND))
      {
        if (obj->func->was_visible)
          return obj->func->was_visible(obj);
@@ -62,6 +63,8 @@ evas_object_is_opaque(Evas_Object *obj)
          return obj->func->is_opaque(obj);
        return 1;
      }
+   if (obj->cur.render_op == EVAS_RENDER_COPY)
+     return 1;
    return 0;
 }
 
@@ -88,7 +91,8 @@ evas_object_is_visible(Evas_Object *obj)
 {
    if ((obj->cur.visible) &&
        ((obj->cur.cache.clip.visible) || (obj->smart.smart)) &&
-       (obj->cur.cache.clip.a > 0))
+       ((obj->cur.cache.clip.a > 0 && obj->cur.render_op == EVAS_RENDER_BLEND)
+       || obj->cur.render_op != EVAS_RENDER_BLEND))
      {
        if (obj->func->is_visible)
          return obj->func->is_visible(obj);
@@ -196,7 +200,7 @@ evas_object_clip_recalc(Evas_Object *obj)
      }
 ////   cx = obj->cur.cache.geometry.x; cy = obj->cur.cache.geometry.y;
 ////   cw = obj->cur.cache.geometry.w; ch = obj->cur.cache.geometry.h;
-   if (obj->cur.color.a == 0) cvis = 0;
+   if (obj->cur.color.a == 0 && obj->cur.render_op == EVAS_RENDER_BLEND) cvis = 0;
    else cvis = obj->cur.visible;
    cr = obj->cur.color.r; cg = obj->cur.color.g;
    cb = obj->cur.color.b; ca = obj->cur.color.a;
@@ -223,7 +227,7 @@ evas_object_clip_recalc(Evas_Object *obj)
        cb = (cb * (nb + 1)) >> 8;
        ca = (ca * (na + 1)) >> 8;
      }
-   if ((ca == 0) || (cw <= 0) || (ch <= 0)) cvis = 0;
+   if ((ca == 0 && obj->cur.render_op == EVAS_RENDER_BLEND) || (cw <= 0) || (ch <= 0)) cvis = 0;
    obj->cur.cache.clip.x = cx;
    obj->cur.cache.clip.y = cy;
    obj->cur.cache.clip.w = cw;