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



commit 325033da3c5bea4c7861e15c475086f261fc06ab
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 ae07d61..5bf8656 100644
--- a/cogl/winsys/cogl-winsys-glx.c
+++ b/cogl/winsys/cogl-winsys-glx.c
@@ -413,6 +413,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]