From a2fb2aefbe74502b6d3b2519d19fa0c7cd1e8457 Mon Sep 17 00:00:00 2001 From: cedric Date: Thu, 13 Oct 2011 09:23:42 +0000 Subject: [PATCH] evas: only draw the hole when it's needed. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@64047 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/canvas/evas_object_image.c | 13 ++++++++++++- src/lib/canvas/evas_render.c | 8 +++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/lib/canvas/evas_object_image.c b/src/lib/canvas/evas_object_image.c index 561b3da..a5d857f 100644 --- a/src/lib/canvas/evas_object_image.c +++ b/src/lib/canvas/evas_object_image.c @@ -3792,7 +3792,18 @@ _evas_object_image_video_overlay_show(Evas_Object *obj) 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.show(o->video.data, obj, &o->video); + } + else + { + /* Cancel dirty on the image */ + Eina_Rectangle *r; + + o->dirty_pixels = 0; + EINA_LIST_FREE(o->pixel_updates, r) + eina_rectangle_free(r); + } 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 ebb9ecf..3762508 100644 --- a/src/lib/canvas/evas_render.c +++ b/src/lib/canvas/evas_render.c @@ -1303,9 +1303,6 @@ evas_render_updates_internal(Evas *e, &e->render_objects, &redraw_all); - _evas_render_phase1_direct(e, &e->active_objects, &e->restack_objects, - &e->delete_objects, &e->render_objects); - /* phase 1.5. check if the video should be inlined or stay in their overlay */ alpha = e->engine.func->canvas_alpha_get(e->engine.data.output, e->engine.data.context); @@ -1319,6 +1316,11 @@ evas_render_updates_internal(Evas *e, _evas_object_image_video_overlay_hide(obj); } + + /* phase 1.8. pre render for proxy */ + _evas_render_phase1_direct(e, &e->active_objects, &e->restack_objects, + &e->delete_objects, &e->render_objects); + /* phase 2. force updates for restacks */ for (i = 0; i < e->restack_objects.count; ++i) { -- 2.7.4