From 16bfa27d43de753c2144f3b55df9254d83c3c9e4 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Fri, 15 Apr 2011 16:03:19 +0100 Subject: [PATCH] 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. --- cogl/winsys/cogl-winsys-glx.c | 9 --------- cogl/winsys/cogl-winsys.c | 9 +++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cogl/winsys/cogl-winsys-glx.c b/cogl/winsys/cogl-winsys-glx.c index f694448ee..c8c18c005 100644 --- a/cogl/winsys/cogl-winsys-glx.c +++ b/cogl/winsys/cogl-winsys-glx.c @@ -1308,15 +1308,6 @@ _cogl_winsys_onscreen_update_swap_throttled (CoglOnscreen *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... */ XVisualInfo * _cogl_winsys_xlib_get_visual_info (void) diff --git a/cogl/winsys/cogl-winsys.c b/cogl/winsys/cogl-winsys.c index e59063a55..547ea5a59 100644 --- a/cogl/winsys/cogl-winsys.c +++ b/cogl/winsys/cogl-winsys.c @@ -27,6 +27,7 @@ #endif #include "cogl.h" +#include "cogl-context-private.h" GQuark _cogl_winsys_error_quark (void) @@ -34,3 +35,11 @@ _cogl_winsys_error_quark (void) 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); +}