evas: only draw the hole when it's needed.
authorCedric BAIL <cedric.bail@free.fr>
Thu, 13 Oct 2011 09:23:42 +0000 (09:23 +0000)
committerCedric BAIL <cedric.bail@free.fr>
Thu, 13 Oct 2011 09:23:42 +0000 (09:23 +0000)
SVN revision: 64047

legacy/evas/src/lib/canvas/evas_object_image.c
legacy/evas/src/lib/canvas/evas_render.c

index 561b3da..a5d857f 100644 (file)
@@ -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;
 }
index ebb9ecf..3762508 100644 (file)
@@ -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)
      {