diff options
author | Jean-Philippe Andre <jp.andre@samsung.com> | 2016-07-18 13:37:15 +0900 |
---|---|---|
committer | Simon Lees <sflees@suse.de> | 2016-07-18 17:28:42 +0930 |
commit | a966029c1043801252fa6308234a20f17f1758c1 (patch) | |
tree | e34aff58637c0154b31e6e5ccacde4de8b60f169 | |
parent | f9146b6cdc8c677d4cfa76f2778740c288ead289 (diff) | |
download | efl-a966029c1043801252fa6308234a20f17f1758c1.tar.gz |
evas: Some more opacity check fixes
This should fix T3309
Snapshot objects are image objects, so the function is_opaque
exists. No need to bypass it. Also, alpha rectangles are not
opaque. Assume that anything with a filter is not opaque.
All of this fixes T3309 but the main point was on snapshot
objects (probably because the only point of a snapshot is
to apply a filter on it).
-rw-r--r-- | src/lib/evas/canvas/evas_object_image.c | 2 | ||||
-rw-r--r-- | src/lib/evas/canvas/evas_object_rectangle.c | 2 | ||||
-rw-r--r-- | src/lib/evas/include/evas_inline.x | 3 |
3 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c index 7a8245c5e7..f51b267e7a 100644 --- a/src/lib/evas/canvas/evas_object_image.c +++ b/src/lib/evas/canvas/evas_object_image.c @@ -4075,6 +4075,8 @@ evas_object_image_is_opaque(Evas_Object *eo_obj EINA_UNUSED, return o->cur->opaque; if (!o->engine_data) return o->cur->opaque; + if (o->has_filter) + return o->cur->opaque; // FIXME: use proxy if (o->cur->source) diff --git a/src/lib/evas/canvas/evas_object_rectangle.c b/src/lib/evas/canvas/evas_object_rectangle.c index a22c990275..b6a05f4b96 100644 --- a/src/lib/evas/canvas/evas_object_rectangle.c +++ b/src/lib/evas/canvas/evas_object_rectangle.c @@ -362,7 +362,7 @@ evas_object_rectangle_is_opaque(Evas_Object *eo_obj EINA_UNUSED, return 1; if (obj->cur->render_op != EVAS_RENDER_BLEND) return 0; - return 1; + return (obj->cur->cache.clip.a == 255) ? 1 : 0; } static int diff --git a/src/lib/evas/include/evas_inline.x b/src/lib/evas/include/evas_inline.x index 1b4222e51d..82c0d193a4 100644 --- a/src/lib/evas/include/evas_inline.x +++ b/src/lib/evas/include/evas_inline.x @@ -79,9 +79,6 @@ evas_object_is_opaque(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj) if ((obj->cur->clipper && obj->cur->clipper->mask->is_mask) || (obj->clip.mask)) return 0; - /* Non masked snapshot are supposed to be opaque */ - if (obj->cur->snapshot) - return 1; if (obj->func->is_opaque) return obj->func->is_opaque(eo_obj, obj, obj->private_data); return 1; |