From ce26379b3b51d250a1cc6fb976751ed69c7d6221 Mon Sep 17 00:00:00 2001 From: cedric Date: Tue, 4 Oct 2011 09:34:01 +0000 Subject: [PATCH] evas: cleanup and reorder video function call to be more usable. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@63799 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/canvas/evas_object_image.c | 10 ++++++---- src/lib/canvas/evas_render.c | 8 -------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/lib/canvas/evas_object_image.c b/src/lib/canvas/evas_object_image.c index 5f1c98d..e976a3f 100644 --- a/src/lib/canvas/evas_object_image.c +++ b/src/lib/canvas/evas_object_image.c @@ -3782,14 +3782,16 @@ _evas_object_image_video_overlay_show(Evas_Object *obj) { Evas_Object_Image *o = (Evas_Object_Image *)(obj->object_data); - if (!o->video_visible || o->created) - o->video.show(o->video.data, obj, &o->video); if (obj->cur.cache.clip.x != obj->prev.cache.clip.x || - obj->cur.cache.clip.y != obj->prev.cache.clip.y) + obj->cur.cache.clip.y != obj->prev.cache.clip.y || + o->created || !o->video_visible) o->video.move(o->video.data, obj, &o->video, obj->cur.cache.clip.x, obj->cur.cache.clip.y); if (obj->cur.cache.clip.w != obj->prev.cache.clip.w || - obj->cur.cache.clip.h != obj->prev.cache.clip.h) + obj->cur.cache.clip.h != obj->prev.cache.clip.h || + o->created || !o->video_visible) o->video.resize(o->video.data, obj, &o->video, obj->cur.cache.clip.w, obj->cur.cache.clip.h); + if (!o->video_visible || o->created) + o->video.show(o->video.data, obj, &o->video); o->video_visible = EINA_TRUE; o->created = EINA_FALSE; } diff --git a/src/lib/canvas/evas_render.c b/src/lib/canvas/evas_render.c index a21b07c..12f5f2c 100644 --- a/src/lib/canvas/evas_render.c +++ b/src/lib/canvas/evas_render.c @@ -659,8 +659,6 @@ _evas_render_can_use_overlay(Evas *e, Evas_Object *obj) unsigned int i; Eina_Bool nooverlay; - /* fprintf(stderr, "object: %p\n", obj); */ - video_parent = _evas_object_image_video_parent_get(obj); /* Check if any one is the stack make this object mapped */ @@ -668,14 +666,10 @@ _evas_render_can_use_overlay(Evas *e, Evas_Object *obj) while (tmp && !_evas_render_has_map(tmp)) tmp = tmp->smart.parent; - /* fprintf(stderr, "mapped ?\n"); */ if (tmp && _evas_render_has_map(tmp)) return EINA_FALSE; /* we are mapped, we can't be an overlay */ - /* fprintf(stderr, "visible ?\n"); */ if (!evas_object_is_visible(obj)) return EINA_FALSE; /* no need to update the overlay if it's not visible */ - /* fprintf(stderr, "recoloring ? %i, %i, %i, %i\n", */ - /* obj->cur.cache.clip.r, obj->cur.cache.clip.g, obj->cur.cache.clip.b, obj->cur.cache.clip.a); */ /* If any recoloring of the surface is needed, n overlay to */ if ((obj->cur.cache.clip.r != 255) || (obj->cur.cache.clip.g != 255) || @@ -835,8 +829,6 @@ _evas_render_can_use_overlay(Evas *e, Evas_Object *obj) /* If there is any pending transparent object, then no overlay */ nooverlay = !!eina_list_count(alphas); - /* fprintf(stderr, "count : %i\n", eina_list_count(alphas)); */ - EINA_LIST_FREE(alphas, r) eina_rectangle_free(r); EINA_LIST_FREE(opaques, r) -- 2.7.4