[Cogl] [PATCH 5/7] remove unused _SWAP_BUFFERS_EVENT defines

Robert Bragg robert at sixbynine.org
Fri Feb 15 08:57:07 PST 2013


From: Robert Bragg <robert at linux.intel.com>

The public COGL_FEATURE_ID_SWAP_BUFFERS_EVENT is no longer really
meaningful since Cogl has replaced the _swap_buffers_callback apis with
a new _frame_callback api which will dispatch _SYNC events on all
platforms and so no feature needs to be queried.

Similarly the private COGL_WINSYS_FEATURE_SWAP_BUFFERS_EVENT is also no
longer needed and is removed by this patch.
---
 cogl/cogl-context.h                             | 4 ----
 cogl/cogl-types.h                               | 4 ----
 cogl/winsys/cogl-winsys-egl-kms.c               | 6 ------
 cogl/winsys/cogl-winsys-glx-feature-functions.h | 1 -
 cogl/winsys/cogl-winsys-glx.c                   | 4 ----
 5 files changed, 19 deletions(-)

diff --git a/cogl/cogl-context.h b/cogl/cogl-context.h
index 4bda5ac..0f4c590 100644
--- a/cogl/cogl-context.h
+++ b/cogl/cogl-context.h
@@ -196,9 +196,6 @@ cogl_is_context (void *object);
  *     supported with CoglBufferAccess including write support.
  * @COGL_FEATURE_ID_MIRRORED_REPEAT: Whether
  *    %COGL_PIPELINE_WRAP_MODE_MIRRORED_REPEAT is supported.
- * @COGL_FEATURE_ID_SWAP_BUFFERS_EVENT:
- *     Available if the window system supports reporting an event
- *     for swap buffer completions.
  * @COGL_FEATURE_ID_GLES2_CONTEXT: Whether creating new GLES2 contexts is
  *    suported.
  * @COGL_FEATURE_ID_DEPTH_TEXTURE: Whether #CoglFramebuffer support rendering
@@ -230,7 +227,6 @@ typedef enum _CoglFeatureID
   COGL_FEATURE_ID_MAP_BUFFER_FOR_READ,
   COGL_FEATURE_ID_MAP_BUFFER_FOR_WRITE,
   COGL_FEATURE_ID_MIRRORED_REPEAT,
-  COGL_FEATURE_ID_SWAP_BUFFERS_EVENT,
   COGL_FEATURE_ID_GLES2_CONTEXT,
   COGL_FEATURE_ID_DEPTH_TEXTURE,
   COGL_FEATURE_ID_PRESENTATION_TIME,
diff --git a/cogl/cogl-types.h b/cogl/cogl-types.h
index e4d8aae..48e8488 100644
--- a/cogl/cogl-types.h
+++ b/cogl/cogl-types.h
@@ -639,10 +639,6 @@ typedef enum _CoglWinsysFeature
    * pixmaps to textures. */
   COGL_WINSYS_FEATURE_TEXTURE_FROM_PIXMAP,
 
-  /* Available if the window system supports reporting an event
-   * for swap buffer completions. */
-  COGL_WINSYS_FEATURE_SWAP_BUFFERS_EVENT,
-
   /* Available if it's possible to swap a list of sub rectangles
    * from the back buffer to the front buffer */
   COGL_WINSYS_FEATURE_SWAP_REGION,
diff --git a/cogl/winsys/cogl-winsys-egl-kms.c b/cogl/winsys/cogl-winsys-egl-kms.c
index db2b496..76f0990 100644
--- a/cogl/winsys/cogl-winsys-egl-kms.c
+++ b/cogl/winsys/cogl-winsys-egl-kms.c
@@ -752,12 +752,6 @@ static CoglBool
 _cogl_winsys_egl_context_init (CoglContext *context,
                                CoglError **error)
 {
-  COGL_FLAGS_SET (context->features,
-                  COGL_FEATURE_ID_SWAP_BUFFERS_EVENT, TRUE);
-  /* TODO: remove this deprecated feature */
-  COGL_FLAGS_SET (context->winsys_features,
-                  COGL_WINSYS_FEATURE_SWAP_BUFFERS_EVENT,
-                  TRUE);
   COGL_FLAGS_SET (context->winsys_features,
                   COGL_WINSYS_FEATURE_SYNC_AND_COMPLETE_EVENT,
                   TRUE);
diff --git a/cogl/winsys/cogl-winsys-glx-feature-functions.h b/cogl/winsys/cogl-winsys-glx-feature-functions.h
index 156b58f..a48769e 100644
--- a/cogl/winsys/cogl-winsys-glx-feature-functions.h
+++ b/cogl/winsys/cogl-winsys-glx-feature-functions.h
@@ -169,7 +169,6 @@ COGL_WINSYS_FEATURE_BEGIN (255, 255,
                            swap_event,
                            "INTEL\0",
                            "swap_event\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 7508f91..affc3ba 100644
--- a/cogl/winsys/cogl-winsys-glx.c
+++ b/cogl/winsys/cogl-winsys-glx.c
@@ -726,10 +726,6 @@ update_winsys_features (CoglContext *context, CoglError **error)
 
   if (_cogl_winsys_has_feature (COGL_WINSYS_FEATURE_SYNC_AND_COMPLETE_EVENT))
     {
-      /* TODO: remove this deprecated feature */
-      COGL_FLAGS_SET (context->features,
-                      COGL_FEATURE_ID_SWAP_BUFFERS_EVENT,
-                      TRUE);
       COGL_FLAGS_SET (context->features,
                       COGL_FEATURE_ID_PRESENTATION_TIME,
                       TRUE);
-- 
1.8.1.1



More information about the Cogl mailing list