From e078838774aa753136601249c8b589d6b99e7367 Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Thu, 11 Feb 2016 17:12:09 -0500 Subject: [PATCH] Fix the get_clock_time() without GLX_OML_sync_control When we don't have GLX_OML_sync_control, we still can set the frame presentation time, but we always use the system monotonic time, so return that from get_clock_time(). https://bugzilla.gnome.org/show_bug.cgi?id=779039 --- cogl/cogl/winsys/cogl-winsys-glx.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cogl/cogl/winsys/cogl-winsys-glx.c b/cogl/cogl/winsys/cogl-winsys-glx.c index 5a2700176..7ad1a3fdf 100644 --- a/cogl/cogl/winsys/cogl-winsys-glx.c +++ b/cogl/cogl/winsys/cogl-winsys-glx.c @@ -296,6 +296,9 @@ _cogl_winsys_get_clock_time (CoglContext *context) { CoglGLXRenderer *glx_renderer = context->display->renderer->winsys; + if (!glx_renderer->glXWaitForMsc) + return get_monotonic_time_ns (); + /* We don't call ensure_ust_type() because we don't have a drawable * to work with. cogl_get_clock_time() is documented to only work * once a valid, non-zero, timestamp has been retrieved from Cogl.