diff options
author | Owen W. Taylor <otaylor@fishsoup.net> | 2016-02-11 17:12:09 -0500 |
---|---|---|
committer | Owen W. Taylor <otaylor@fishsoup.net> | 2017-02-21 16:25:01 -0500 |
commit | e078838774aa753136601249c8b589d6b99e7367 (patch) | |
tree | e7fe4f2ee3ffb114c1f47f8d4b7fa7f6527ee5de /cogl | |
parent | 1b03dd6704abfc0182de61ef86c91c9e2a2639cf (diff) | |
download | mutter-e078838774aa753136601249c8b589d6b99e7367.tar.gz |
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
Diffstat (limited to 'cogl')
-rw-r--r-- | cogl/cogl/winsys/cogl-winsys-glx.c | 3 |
1 files changed, 3 insertions, 0 deletions
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. |