summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-08-14 10:10:18 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-08-20 08:52:32 +0100
commitcef058c48b21c6effed8d6580876632b4344ec7f (patch)
treec494ef225604e7875a5e0e123af8b4932444b62d
parent1ee6e020bb623e91df9c10a161efd01ba2a45603 (diff)
ecore x - go back to vsync thread. this will be more reliable
while it requires an extra wakeup from vsync thread -> e and this adds a bit of jitter, it's mroe reliable in the face of "missed a frame" timings and doesnt degrade as badly.
-rw-r--r--src/lib/ecore_x/ecore_x_vsync.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/ecore_x/ecore_x_vsync.c b/src/lib/ecore_x/ecore_x_vsync.c
index c03e2768c4..9fa2f6df25 100644
--- a/src/lib/ecore_x/ecore_x_vsync.c
+++ b/src/lib/ecore_x/ecore_x_vsync.c
@@ -154,7 +154,7 @@ static Ecore_Thread *drm_thread = NULL;
154static Eina_Spinlock tick_queue_lock; 154static Eina_Spinlock tick_queue_lock;
155static int tick_queue_count = 0; 155static int tick_queue_count = 0;
156static Eina_Bool tick_skip = EINA_FALSE; 156static Eina_Bool tick_skip = EINA_FALSE;
157static Eina_Bool threaded_vsync = EINA_FALSE; 157static Eina_Bool threaded_vsync = EINA_TRUE;
158static Ecore_Timer *fail_timer = NULL; 158static Ecore_Timer *fail_timer = NULL;
159static Ecore_Timer *fallback_timer = NULL; 159static Ecore_Timer *fallback_timer = NULL;
160 160
@@ -907,6 +907,7 @@ ecore_x_vsync_animator_tick_source_set(Ecore_X_Window win)
907 struct stat st; 907 struct stat st;
908 908
909 if (getenv("ECORE_VSYNC_THREAD")) threaded_vsync = EINA_TRUE; 909 if (getenv("ECORE_VSYNC_THREAD")) threaded_vsync = EINA_TRUE;
910 if (getenv("ECORE_VSYNC_NO_THREAD")) threaded_vsync = EINA_FALSE;
910 home = eina_environment_home_get(); 911 home = eina_environment_home_get();
911 if (!home) eina_environment_tmp_get(); 912 if (!home) eina_environment_tmp_get();
912 snprintf(buf, sizeof(buf), "%s/.ecore-no-vsync", home); 913 snprintf(buf, sizeof(buf), "%s/.ecore-no-vsync", home);