cogl: Remove unused features functions
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3804>
This commit is contained in:
parent
ed0ee25843
commit
94c2c41b66
@ -219,48 +219,6 @@ typedef enum _CoglFeatureID
|
|||||||
COGL_EXPORT gboolean
|
COGL_EXPORT gboolean
|
||||||
cogl_has_feature (CoglContext *context, CoglFeatureID feature);
|
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:
|
* CoglGraphicsResetStatus:
|
||||||
* @COGL_GRAPHICS_RESET_STATUS_NO_ERROR:
|
* @COGL_GRAPHICS_RESET_STATUS_NO_ERROR:
|
||||||
|
@ -80,32 +80,6 @@ cogl_has_feature (CoglContext *ctx, CoglFeatureID feature)
|
|||||||
return COGL_FLAGS_GET (ctx->features, 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
|
void
|
||||||
cogl_flush (void)
|
cogl_flush (void)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user