mirror of
https://github.com/brl/mutter.git
synced 2024-11-24 17:10:40 -05:00
cogl: Remove unused CoglFeatureFlags
https://gitlab.gnome.org/GNOME/mutter/merge_requests/866
This commit is contained in:
parent
67d5ebb187
commit
bd1630a12c
@ -33,8 +33,6 @@
|
||||
*
|
||||
* It is possible to ask whether Clutter has support for specific features at
|
||||
* run-time.
|
||||
*
|
||||
* See also cogl_get_features() and #CoglFeatureFlags
|
||||
*/
|
||||
|
||||
#include "clutter-build-config.h"
|
||||
@ -60,7 +58,7 @@ typedef struct ClutterFeatures
|
||||
static ClutterFeatures* __features = NULL;
|
||||
|
||||
static ClutterFeatureFlags
|
||||
clutter_features_from_cogl (guint cogl_flags)
|
||||
clutter_features_from_cogl (void)
|
||||
{
|
||||
ClutterFeatureFlags clutter_flags = 0;
|
||||
|
||||
@ -94,7 +92,7 @@ _clutter_feature_init (GError **error)
|
||||
if (!_clutter_backend_create_context (context->backend, error))
|
||||
return FALSE;
|
||||
|
||||
__features->flags = (clutter_features_from_cogl (cogl_get_features ())
|
||||
__features->flags = (clutter_features_from_cogl ()
|
||||
| _clutter_backend_get_features (context->backend));
|
||||
|
||||
__features->features_set = TRUE;
|
||||
|
@ -97,7 +97,6 @@ struct _CoglContext
|
||||
|
||||
/* Features cache */
|
||||
unsigned long features[COGL_FLAGS_N_LONGS_FOR_SIZE (_COGL_N_FEATURE_IDS)];
|
||||
CoglFeatureFlags feature_flags; /* legacy/deprecated feature flags */
|
||||
unsigned long private_features
|
||||
[COGL_FLAGS_N_LONGS_FOR_SIZE (COGL_N_PRIVATE_FEATURES)];
|
||||
|
||||
|
@ -163,7 +163,6 @@ cogl_context_new (CoglDisplay *display,
|
||||
|
||||
/* Init default values */
|
||||
memset (context->features, 0, sizeof (context->features));
|
||||
context->feature_flags = 0;
|
||||
memset (context->private_features, 0, sizeof (context->private_features));
|
||||
memset (context->winsys_features, 0, sizeof (context->winsys_features));
|
||||
|
||||
|
@ -196,7 +196,7 @@ error:
|
||||
gles_availability, \
|
||||
namespaces, extension_names) \
|
||||
{ min_gl_major, min_gl_minor, gles_availability, namespaces, \
|
||||
extension_names, 0, 0, 0, \
|
||||
extension_names, 0, 0, \
|
||||
cogl_ext_ ## name ## _funcs },
|
||||
#undef COGL_EXT_FUNCTION
|
||||
#define COGL_EXT_FUNCTION(ret, name, args)
|
||||
|
@ -77,8 +77,6 @@ struct _CoglFeatureData
|
||||
extension is different from the namespace, you can specify it
|
||||
with a ':' after the namespace */
|
||||
const char *extension_names;
|
||||
/* A set of feature flags to enable if the extension is available */
|
||||
CoglFeatureFlags feature_flags;
|
||||
/* A set of private feature flags to enable if the extension is
|
||||
* available */
|
||||
int feature_flags_private;
|
||||
|
@ -69,8 +69,6 @@ typedef struct _CoglGLXRenderer
|
||||
unsigned long base_winsys_features
|
||||
[COGL_FLAGS_N_LONGS_FOR_SIZE (COGL_WINSYS_FEATURE_N_FEATURES)];
|
||||
|
||||
CoglFeatureFlags legacy_feature_flags;
|
||||
|
||||
/* Function pointers for core GLX functionality. We can't just link
|
||||
against these directly because we need to conditionally load
|
||||
libGL when we are using GLX so that it won't conflict with a GLES
|
||||
|
@ -110,15 +110,6 @@ typedef struct _CoglTextureVertex CoglTextureVertex;
|
||||
#define COGL_DEPTH_BIT (1 << 8)
|
||||
#define COGL_STENCIL_BIT (1 << 9)
|
||||
|
||||
/**
|
||||
* CoglFeatureFlags:
|
||||
*
|
||||
* Flags for the supported features.
|
||||
*
|
||||
* Since: 0.8
|
||||
*/
|
||||
typedef int CoglFeatureFlags;
|
||||
|
||||
/**
|
||||
* CoglBufferTarget:
|
||||
* @COGL_WINDOW_BUFFER: FIXME
|
||||
|
@ -191,22 +191,6 @@ cogl_viewport (unsigned int width,
|
||||
cogl_set_viewport (0, 0, width, height);
|
||||
}
|
||||
|
||||
CoglFeatureFlags
|
||||
cogl_get_features (void)
|
||||
{
|
||||
_COGL_GET_CONTEXT (ctx, 0);
|
||||
|
||||
return ctx->feature_flags;
|
||||
}
|
||||
|
||||
gboolean
|
||||
cogl_features_available (CoglFeatureFlags features)
|
||||
{
|
||||
_COGL_GET_CONTEXT (ctx, 0);
|
||||
|
||||
return (ctx->feature_flags & features) == features;
|
||||
}
|
||||
|
||||
gboolean
|
||||
cogl_has_feature (CoglContext *ctx, CoglFeatureID feature)
|
||||
{
|
||||
|
@ -297,7 +297,6 @@ cogl_get_bitmasks
|
||||
cogl_get_clock_time
|
||||
cogl_get_depth_test_enabled
|
||||
cogl_get_draw_framebuffer
|
||||
cogl_get_features
|
||||
cogl_get_graphics_reset_status
|
||||
cogl_get_modelview_matrix
|
||||
cogl_get_option_group
|
||||
|
@ -61,36 +61,6 @@ GOptionGroup *
|
||||
cogl_get_option_group (void);
|
||||
|
||||
/* Misc */
|
||||
/**
|
||||
* cogl_get_features:
|
||||
*
|
||||
* Returns all of the features supported by COGL.
|
||||
*
|
||||
* Return value: A logical OR of all the supported COGL features.
|
||||
*
|
||||
* Since: 0.8
|
||||
* Deprecated: 1.10: Use cogl_foreach_feature() instead
|
||||
*/
|
||||
COGL_DEPRECATED_FOR (cogl_foreach_feature)
|
||||
CoglFeatureFlags
|
||||
cogl_get_features (void);
|
||||
|
||||
/**
|
||||
* cogl_features_available:
|
||||
* @features: A bitmask of features to check for
|
||||
*
|
||||
* Checks whether the given COGL features are available. Multiple
|
||||
* features can be checked for by or-ing them together with the '|'
|
||||
* operator. %TRUE is only returned if all of the requested features
|
||||
* are available.
|
||||
*
|
||||
* Return value: %TRUE if the features are available, %FALSE otherwise.
|
||||
* Deprecated: 1.10: Use cogl_has_feature() instead
|
||||
*/
|
||||
COGL_DEPRECATED_FOR (cogl_has_feature)
|
||||
gboolean
|
||||
cogl_features_available (CoglFeatureFlags features);
|
||||
|
||||
/**
|
||||
* cogl_get_proc_address: (skip)
|
||||
* @name: the name of the function.
|
||||
|
@ -333,7 +333,6 @@ static gboolean
|
||||
_cogl_driver_update_features (CoglContext *ctx,
|
||||
GError **error)
|
||||
{
|
||||
CoglFeatureFlags flags = 0;
|
||||
unsigned long private_features
|
||||
[COGL_FLAGS_N_LONGS_FOR_SIZE (COGL_N_PRIVATE_FEATURES)] = { 0 };
|
||||
char **gl_extensions;
|
||||
@ -480,7 +479,6 @@ _cogl_driver_update_features (CoglContext *ctx,
|
||||
/* Cache features */
|
||||
for (i = 0; i < G_N_ELEMENTS (private_features); i++)
|
||||
ctx->private_features[i] |= private_features[i];
|
||||
ctx->feature_flags |= flags;
|
||||
|
||||
g_strfreev (gl_extensions);
|
||||
|
||||
|
@ -242,7 +242,6 @@ _cogl_driver_update_features (CoglContext *context,
|
||||
{
|
||||
unsigned long private_features
|
||||
[COGL_FLAGS_N_LONGS_FOR_SIZE (COGL_N_PRIVATE_FEATURES)] = { 0 };
|
||||
CoglFeatureFlags flags = 0;
|
||||
char **gl_extensions;
|
||||
int gl_major, gl_minor;
|
||||
int i;
|
||||
@ -364,7 +363,6 @@ _cogl_driver_update_features (CoglContext *context,
|
||||
/* Cache features */
|
||||
for (i = 0; i < G_N_ELEMENTS (private_features); i++)
|
||||
context->private_features[i] |= private_features[i];
|
||||
context->feature_flags |= flags;
|
||||
|
||||
g_strfreev (gl_extensions);
|
||||
|
||||
|
@ -48,7 +48,6 @@ _cogl_driver_update_features (CoglContext *ctx,
|
||||
/* _cogl_gpu_info_init (ctx, &ctx->gpu); */
|
||||
|
||||
memset (ctx->private_features, 0, sizeof (ctx->private_features));
|
||||
ctx->feature_flags = 0;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -97,7 +97,7 @@
|
||||
#define COGL_WINSYS_FEATURE_BEGIN(name, namespaces, extension_names, \
|
||||
egl_private_flags) \
|
||||
{ 255, 255, 0, namespaces, extension_names, \
|
||||
0, egl_private_flags, \
|
||||
egl_private_flags, \
|
||||
0, \
|
||||
cogl_egl_feature_ ## name ## _funcs },
|
||||
#undef COGL_WINSYS_FEATURE_FUNCTION
|
||||
|
@ -142,7 +142,6 @@ typedef struct _CoglTexturePixmapGLX
|
||||
winsys_feature) \
|
||||
{ major_version, minor_version, \
|
||||
0, namespaces, extension_names, \
|
||||
feature_flags, \
|
||||
0, \
|
||||
winsys_feature, \
|
||||
cogl_glx_feature_ ## name ## _funcs },
|
||||
@ -708,8 +707,6 @@ update_base_winsys_features (CoglRenderer *renderer)
|
||||
split_extensions,
|
||||
glx_renderer))
|
||||
{
|
||||
glx_renderer->legacy_feature_flags |=
|
||||
winsys_feature_data[i].feature_flags;
|
||||
if (winsys_feature_data[i].winsys_feature)
|
||||
COGL_FLAGS_SET (glx_renderer->base_winsys_features,
|
||||
winsys_feature_data[i].winsys_feature,
|
||||
@ -830,8 +827,6 @@ update_winsys_features (CoglContext *context, GError **error)
|
||||
glx_renderer->base_winsys_features,
|
||||
sizeof (context->winsys_features));
|
||||
|
||||
context->feature_flags |= glx_renderer->legacy_feature_flags;
|
||||
|
||||
if (glx_renderer->glXCopySubBuffer || context->glBlitFramebuffer)
|
||||
{
|
||||
CoglGpuInfo *info = &context->gpu;
|
||||
|
@ -66,14 +66,6 @@
|
||||
fun:g_get_charset
|
||||
}
|
||||
|
||||
{
|
||||
cogl_features
|
||||
Memcheck:Leak
|
||||
fun:*alloc
|
||||
...
|
||||
fun:cogl_get_features
|
||||
}
|
||||
|
||||
{
|
||||
glx_query_version
|
||||
Memcheck:Leak
|
||||
|
@ -66,14 +66,6 @@
|
||||
fun:g_get_charset
|
||||
}
|
||||
|
||||
{
|
||||
cogl_features
|
||||
Memcheck:Leak
|
||||
fun:*alloc
|
||||
...
|
||||
fun:cogl_get_features
|
||||
}
|
||||
|
||||
{
|
||||
glx_query_version
|
||||
Memcheck:Leak
|
||||
|
Loading…
Reference in New Issue
Block a user