ee_wayland: Prevent extra commits
authorDerek Foreman <derekf@osg.samsung.com>
Thu, 15 Mar 2018 19:36:27 +0000 (14:36 -0500)
committerWonki Kim <wonki_.kim@samsung.com>
Tue, 10 Apr 2018 11:21:57 +0000 (20:21 +0900)
It's possible that we unregister then reregister an animator so quickly
that the ecore_evas idle enter/exiters haven't had a chance to run yet.
In this case a render will come shortly anyway and we shouldn't use a
'false' commit to kick off a frame callback.

Silences an ERR and unmeasurably improves protocol utilization.

src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c

index 3e3ee74..93b906a 100644 (file)
@@ -131,7 +131,8 @@ _ecore_evas_wl_common_animator_register(Ecore_Evas *ee)
 
    edata->frame = ecore_wl2_window_frame_callback_add(edata->win,
                                                       _anim_cb_tick, ee);
-   if (!ecore_wl2_window_pending_get(edata->win) && !ee->in_async_render)
+   if (!ecore_wl2_window_pending_get(edata->win) && !ee->in_async_render &&
+       !ee->animator_ticked && !ee->animator_ran)
      ecore_wl2_window_false_commit(edata->win);
    edata->ticking = EINA_TRUE;
 }