cogl-winsys: Move _cogl_winsys_has_feature to cogl-winsys.c

The code for _cogl_winsys_has_feature will be identical in all of the
winsys backends for the time being, so it seems to make sense to have
it in the common cogl-winsys.c file.
This commit is contained in:
Neil Roberts 2011-04-15 16:03:19 +01:00
parent 4a7762d6d7
commit 16bfa27d43
2 changed files with 9 additions and 9 deletions

View File

@ -1308,15 +1308,6 @@ _cogl_winsys_onscreen_update_swap_throttled (CoglOnscreen *onscreen)
_cogl_winsys_onscreen_bind (onscreen); _cogl_winsys_onscreen_bind (onscreen);
} }
/* FIXME: we should distinguish renderer and context features */
gboolean
_cogl_winsys_has_feature (CoglWinsysFeature feature)
{
_COGL_GET_CONTEXT (ctx, FALSE);
return COGL_FLAGS_GET (ctx->winsys_features, feature);
}
/* XXX: This is a particularly hacky _cogl_winsys interface... */ /* XXX: This is a particularly hacky _cogl_winsys interface... */
XVisualInfo * XVisualInfo *
_cogl_winsys_xlib_get_visual_info (void) _cogl_winsys_xlib_get_visual_info (void)

View File

@ -27,6 +27,7 @@
#endif #endif
#include "cogl.h" #include "cogl.h"
#include "cogl-context-private.h"
GQuark GQuark
_cogl_winsys_error_quark (void) _cogl_winsys_error_quark (void)
@ -34,3 +35,11 @@ _cogl_winsys_error_quark (void)
return g_quark_from_static_string ("cogl-winsys-error-quark"); return g_quark_from_static_string ("cogl-winsys-error-quark");
} }
/* FIXME: we should distinguish renderer and context features */
gboolean
_cogl_winsys_has_feature (CoglWinsysFeature feature)
{
_COGL_GET_CONTEXT (ctx, FALSE);
return COGL_FLAGS_GET (ctx->winsys_features, feature);
}