[cogl/cogl-1.12] winsys-glx: Remove the vblank counter feature when indirect rendering



commit f9e7f8df94bb8ff6bd96207fc7cffe8fdee20ea1
Author: Neil Roberts <neil linux intel com>
Date:   Thu Sep 27 14:12:08 2012 +0100

    winsys-glx: Remove the vblank counter feature when indirect rendering
    
    Previously when Cogl detects that the GLX context is indirect it
    resets the function pointers for the VBLANK_COUNTER feature to NULL.
    However it wasn't removing the VBLANK_COUNTER feature flag. Some other
    parts of the winsys check for that feature flag rather than checking
    whether the pointer is NULL so it would end up calling an invalid
    function pointer and crashing. This just fixes it to also clear the
    feature flag.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=684917
    
    Reviewed-by: Robert Bragg <robert linux intel com>
    
    (cherry picked from commit e947c713a541086f80a308d22774229f0720196a)

 cogl/winsys/cogl-winsys-glx.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/cogl/winsys/cogl-winsys-glx.c b/cogl/winsys/cogl-winsys-glx.c
index 8fc9b71..839464f 100644
--- a/cogl/winsys/cogl-winsys-glx.c
+++ b/cogl/winsys/cogl-winsys-glx.c
@@ -437,6 +437,9 @@ update_winsys_features (CoglContext *context, GError **error)
     {
       glx_renderer->pf_glXGetVideoSync = NULL;
       glx_renderer->pf_glXWaitVideoSync = NULL;
+      COGL_FLAGS_SET (context->winsys_features,
+                      COGL_WINSYS_FEATURE_VBLANK_COUNTER,
+                      FALSE);
     }
 
   if (glx_renderer->pf_glXWaitVideoSync)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]