[mutter] Fix the get_clock_time() without GLX_OML_sync_control
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [mutter] Fix the get_clock_time() without GLX_OML_sync_control
- Date: Wed, 22 Feb 2017 16:15:17 +0000 (UTC)
commit e078838774aa753136601249c8b589d6b99e7367
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Thu Feb 11 17:12:09 2016 -0500
    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 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 5a27001..7ad1a3f 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.
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]