Blame SOURCES/0005-Fix-the-get_clock_time-without-GLX_OML_sync_control.patch

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