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
This commit is contained in:
Owen W. Taylor 2016-02-11 17:12:09 -05:00
parent 1b03dd6704
commit e078838774

View File

@ -296,6 +296,9 @@ _cogl_winsys_get_clock_time (CoglContext *context)
{ {
CoglGLXRenderer *glx_renderer = context->display->renderer->winsys; 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 /* 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 * to work with. cogl_get_clock_time() is documented to only work
* once a valid, non-zero, timestamp has been retrieved from Cogl. * once a valid, non-zero, timestamp has been retrieved from Cogl.