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