1
0
Fork 0

cogl: Remove unused features functions

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3804>
This commit is contained in:
Bilal Elmoussaoui 2024-06-11 23:28:02 +02:00 committed by Bilal Elmoussaoui
parent ed0ee25843
commit 94c2c41b66
2 changed files with 0 additions and 68 deletions

View file

@ -219,48 +219,6 @@ typedef enum _CoglFeatureID
COGL_EXPORT gboolean
cogl_has_feature (CoglContext *context, CoglFeatureID feature);
/**
* cogl_has_features:
* @context: A #CoglContext pointer
* @...: A 0 terminated list of `CoglFeatureID`s
*
* Checks if a list of features are all currently available.
*
* This checks all of the listed features using cogl_has_feature() and
* returns %TRUE if all the features are available or %FALSE
* otherwise.
*
* Return value: %TRUE if all the features are available, %FALSE
* otherwise.
*/
COGL_EXPORT gboolean
cogl_has_features (CoglContext *context, ...);
/**
* CoglFeatureCallback:
* @feature: A single feature currently supported by Cogl
* @user_data: A private pointer passed to cogl_foreach_feature().
*
* A callback used with cogl_foreach_feature() for enumerating all
* context level features supported by Cogl.
*/
typedef void (*CoglFeatureCallback) (CoglFeatureID feature, void *user_data);
/**
* cogl_foreach_feature:
* @context: A #CoglContext pointer
* @callback: (scope call): A #CoglFeatureCallback called for each
* supported feature
* @user_data: (closure): Private data to pass to the callback
*
* Iterates through all the context level features currently supported
* for a given @context and for each feature @callback is called.
*/
COGL_EXPORT void
cogl_foreach_feature (CoglContext *context,
CoglFeatureCallback callback,
void *user_data);
/**
* CoglGraphicsResetStatus:
* @COGL_GRAPHICS_RESET_STATUS_NO_ERROR:

View file

@ -80,32 +80,6 @@ cogl_has_feature (CoglContext *ctx, CoglFeatureID feature)
return COGL_FLAGS_GET (ctx->features, feature);
}
gboolean
cogl_has_features (CoglContext *ctx, ...)
{
va_list args;
CoglFeatureID feature;
va_start (args, ctx);
while ((feature = va_arg (args, CoglFeatureID)))
if (!cogl_has_feature (ctx, feature))
return FALSE;
va_end (args);
return TRUE;
}
void
cogl_foreach_feature (CoglContext *ctx,
CoglFeatureCallback callback,
void *user_data)
{
int i;
for (i = 0; i < _COGL_N_FEATURE_IDS; i++)
if (COGL_FLAGS_GET (ctx->features, i))
callback (i, user_data);
}
void
cogl_flush (void)
{