diff options
author | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2018-04-25 18:22:56 +0900 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2018-04-30 15:32:10 +0900 |
commit | 5b08611a9eac53c9b905f7c136df6c55796f496d (patch) | |
tree | e08f6ccf0d6a4dace2aa0da62283e03e38b5903b | |
parent | d8bfcd511e719ed43be0383482bffa4288efe338 (diff) | |
download | efl-5b08611a9eac53c9b905f7c136df6c55796f496d.tar.gz |
ecore animator, x, vsync ecore evas restore x vsync to work again
so i found the work with wayland and having animator sources broke
that same source from ecore_x that was there from long ago, so i've
put in an exception if there are x based engines from restting to a
timer animator because ecore_x would have switched toa custom ticker
already, and this just resets it. also just set the source after
setting the tick callbacks and ensure tick cb's are null before going
to timer source as well. this cleans up this little but of animaatior
vsync modification to properly vsync in both x and wayland too now.
@fix
-rw-r--r-- | src/lib/ecore_evas/ecore_evas.c | 35 |
1 files changed, 25 insertions, 10 deletions
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c index 1866d48676..da3401a286 100644 --- a/src/lib/ecore_evas/ecore_evas.c +++ b/src/lib/ecore_evas/ecore_evas.c @@ -3117,16 +3117,26 @@ _ecore_evas_tick_source_find(void) { Ecore_Evas *ee; Eina_Bool source = EINA_FALSE; + Eina_Bool have_x = EINA_FALSE; // Check if we do have a potential tick source for legacy EINA_INLIST_FOREACH(ecore_evases, ee) - if (!ee->deleted && - ee->engine.func->fn_animator_register && - ee->engine.func->fn_animator_unregister) - { - source = EINA_TRUE; - break; - } + { + if (!ee->deleted) + { + if ((ee->engine.func->fn_animator_register) && + (ee->engine.func->fn_animator_unregister)) + { + source = EINA_TRUE; + } + if (ee->driver) + { + if ((!strcmp(ee->driver, "software_x11")) || + (!strcmp(ee->driver, "opengl_x11"))) + have_x = EINA_TRUE; + } + } + } // If just one source require fallback, we can't be sure that // we are not running enlightenment and that this source might @@ -3143,16 +3153,21 @@ _ecore_evas_tick_source_find(void) if (!source) { - ecore_animator_source_set(ECORE_ANIMATOR_SOURCE_TIMER); + if (!have_x) + { + ecore_animator_custom_source_tick_begin_callback_set(NULL, NULL); + ecore_animator_custom_source_tick_end_callback_set(NULL, NULL); + ecore_animator_source_set(ECORE_ANIMATOR_SOURCE_TIMER); + } } else { // Source set will trigger the previous tick end registered and then the new begin. // As we don't what was in behind, better first begin and end after source is set. ecore_animator_custom_source_tick_begin_callback_set(_ecore_evas_custom_tick_begin, NULL); - ecore_animator_source_set(ECORE_ANIMATOR_SOURCE_CUSTOM); ecore_animator_custom_source_tick_end_callback_set(_ecore_evas_custom_tick_end, NULL); - } + ecore_animator_source_set(ECORE_ANIMATOR_SOURCE_CUSTOM); + } } static Eina_Bool |