evas: cleanup and reorder video function call to be more usable.

SVN revision: 63799
This commit is contained in:
Cedric BAIL 2011-10-04 09:34:01 +00:00
parent 7b33abd685
commit 8edb994133
2 changed files with 6 additions and 12 deletions

View File

@ -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;
}

View File

@ -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)