evas: Also fix was_opaque for rect & image
authorJean-Philippe Andre <jp.andre@samsung.com>
Mon, 18 Jul 2016 04:53:33 +0000 (13:53 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Mon, 18 Jul 2016 04:54:27 +0000 (13:54 +0900)
I believe the function is not used, so it doesn't really
matter.

src/lib/evas/canvas/evas_object_image.c
src/lib/evas/canvas/evas_object_rectangle.c

index 36babe3..8ba756d 100644 (file)
@@ -2601,6 +2601,8 @@ evas_object_image_was_opaque(Evas_Object *eo_obj EINA_UNUSED,
           return o->prev->opaque; /* FIXME: Should go poke at the object */
         if (o->prev->has_alpha)
           return o->prev->opaque;
+        if (o->has_filter)
+          return o->cur->opaque;
 
         EINA_COW_WRITE_BEGIN(evas_object_image_state_cow, o->prev, Evas_Object_Image_State, state_write)
           {
index d394546..d38379e 100644 (file)
@@ -376,7 +376,7 @@ evas_object_rectangle_was_opaque(Evas_Object *eo_obj EINA_UNUSED,
        return 1;
    if (obj->prev->render_op != EVAS_RENDER_BLEND)
        return 0;
-   return 1;
+   return (obj->prev->cache.clip.a == 255) ? 1 : 0;
 }
 
 static unsigned int evas_object_rectangle_id_get(Evas_Object *eo_obj)