[cogl/cogl-1.18] GLX winsys: fix feature handling for INTEL_swap_event



commit ee5dc4261233b5b1febfb762ef174ecee0fb6568
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Mon Dec 2 22:08:57 2013 -0500

    GLX winsys: fix feature handling for INTEL_swap_event
    
    The declaration of INTEL_swap_event was treating winsys features as
    if they were a bitfield, but they aren't. The end result was that
    instead of reporting two features when INTEL_swap_event is present,
    we report none.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=719741
    
    Reviewed-by: Robert Bragg <robert linux intel com>

 cogl/winsys/cogl-winsys-glx-feature-functions.h |    1 -
 cogl/winsys/cogl-winsys-glx.c                   |    2 ++
 2 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/cogl/winsys/cogl-winsys-glx-feature-functions.h b/cogl/winsys/cogl-winsys-glx-feature-functions.h
index 9e7b49d..8b5d97a 100644
--- a/cogl/winsys/cogl-winsys-glx-feature-functions.h
+++ b/cogl/winsys/cogl-winsys-glx-feature-functions.h
@@ -177,7 +177,6 @@ COGL_WINSYS_FEATURE_BEGIN (255, 255,
                            "INTEL\0",
                            "swap_event\0",
                            0,
-                           COGL_WINSYS_FEATURE_SWAP_BUFFERS_EVENT |
                            COGL_WINSYS_FEATURE_SYNC_AND_COMPLETE_EVENT)
 COGL_WINSYS_FEATURE_END ()
 
diff --git a/cogl/winsys/cogl-winsys-glx.c b/cogl/winsys/cogl-winsys-glx.c
index 9b8677f..9aa70a7 100644
--- a/cogl/winsys/cogl-winsys-glx.c
+++ b/cogl/winsys/cogl-winsys-glx.c
@@ -850,6 +850,8 @@ update_winsys_features (CoglContext *context, CoglError **error)
 
   if (_cogl_winsys_has_feature (COGL_WINSYS_FEATURE_SYNC_AND_COMPLETE_EVENT))
     {
+      COGL_FLAGS_SET (context->winsys_features,
+                     COGL_WINSYS_FEATURE_SWAP_BUFFERS_EVENT, TRUE);
       /* TODO: remove this deprecated feature */
       COGL_FLAGS_SET (context->features,
                       COGL_FEATURE_ID_SWAP_BUFFERS_EVENT,


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