summaryrefslogtreecommitdiff
path: root/src/lib/ecore_evas/ecore_evas.c
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-04-25 18:22:56 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-04-30 15:32:10 +0900
commit5b08611a9eac53c9b905f7c136df6c55796f496d (patch)
treee08f6ccf0d6a4dace2aa0da62283e03e38b5903b /src/lib/ecore_evas/ecore_evas.c
parentd8bfcd511e719ed43be0383482bffa4288efe338 (diff)
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
Diffstat (limited to 'src/lib/ecore_evas/ecore_evas.c')
-rw-r--r--src/lib/ecore_evas/ecore_evas.c35
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 1866d48..da3401a 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)
3117{ 3117{
3118 Ecore_Evas *ee; 3118 Ecore_Evas *ee;
3119 Eina_Bool source = EINA_FALSE; 3119 Eina_Bool source = EINA_FALSE;
3120 Eina_Bool have_x = EINA_FALSE;
3120 3121
3121 // Check if we do have a potential tick source for legacy 3122 // Check if we do have a potential tick source for legacy
3122 EINA_INLIST_FOREACH(ecore_evases, ee) 3123 EINA_INLIST_FOREACH(ecore_evases, ee)
3123 if (!ee->deleted && 3124 {
3124 ee->engine.func->fn_animator_register && 3125 if (!ee->deleted)
3125 ee->engine.func->fn_animator_unregister) 3126 {
3126 { 3127 if ((ee->engine.func->fn_animator_register) &&
3127 source = EINA_TRUE; 3128 (ee->engine.func->fn_animator_unregister))
3128 break; 3129 {
3129 } 3130 source = EINA_TRUE;
3131 }
3132 if (ee->driver)
3133 {
3134 if ((!strcmp(ee->driver, "software_x11")) ||
3135 (!strcmp(ee->driver, "opengl_x11")))
3136 have_x = EINA_TRUE;
3137 }
3138 }
3139 }
3130 3140
3131 // If just one source require fallback, we can't be sure that 3141 // If just one source require fallback, we can't be sure that
3132 // we are not running enlightenment and that this source might 3142 // we are not running enlightenment and that this source might
@@ -3143,16 +3153,21 @@ _ecore_evas_tick_source_find(void)
3143 3153
3144 if (!source) 3154 if (!source)
3145 { 3155 {
3146 ecore_animator_source_set(ECORE_ANIMATOR_SOURCE_TIMER); 3156 if (!have_x)
3157 {
3158 ecore_animator_custom_source_tick_begin_callback_set(NULL, NULL);
3159 ecore_animator_custom_source_tick_end_callback_set(NULL, NULL);
3160 ecore_animator_source_set(ECORE_ANIMATOR_SOURCE_TIMER);
3161 }
3147 } 3162 }
3148 else 3163 else
3149 { 3164 {
3150 // Source set will trigger the previous tick end registered and then the new begin. 3165 // Source set will trigger the previous tick end registered and then the new begin.
3151 // As we don't what was in behind, better first begin and end after source is set. 3166 // As we don't what was in behind, better first begin and end after source is set.
3152 ecore_animator_custom_source_tick_begin_callback_set(_ecore_evas_custom_tick_begin, NULL); 3167 ecore_animator_custom_source_tick_begin_callback_set(_ecore_evas_custom_tick_begin, NULL);
3153 ecore_animator_source_set(ECORE_ANIMATOR_SOURCE_CUSTOM);
3154 ecore_animator_custom_source_tick_end_callback_set(_ecore_evas_custom_tick_end, NULL); 3168 ecore_animator_custom_source_tick_end_callback_set(_ecore_evas_custom_tick_end, NULL);
3155 } 3169 ecore_animator_source_set(ECORE_ANIMATOR_SOURCE_CUSTOM);
3170 }
3156} 3171}
3157 3172
3158static Eina_Bool 3173static Eina_Bool