winsys: Drop xlib_get_visual_info from the vtable
We don't need the hack any more; CoglRenderer has the appropriate API for the Xlib-based winsys backends.
This commit is contained in:
parent
c9080b3e25
commit
812aba31e7
@ -687,24 +687,6 @@ _cogl_winsys_egl_cleanup_context (CoglDisplay *display)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* XXX: This is a particularly hacky _cogl_winsys interface... */
|
|
||||||
static XVisualInfo *
|
|
||||||
_cogl_winsys_xlib_get_visual_info (void)
|
|
||||||
{
|
|
||||||
CoglDisplayEGL *egl_display;
|
|
||||||
|
|
||||||
_COGL_GET_CONTEXT (ctx, NULL);
|
|
||||||
|
|
||||||
_COGL_RETURN_VAL_IF_FAIL (ctx->display->winsys, FALSE);
|
|
||||||
|
|
||||||
egl_display = ctx->display->winsys;
|
|
||||||
|
|
||||||
if (!egl_display->found_egl_config)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
return get_visual_info (ctx->display, egl_display->egl_config);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef EGL_KHR_image_pixmap
|
#ifdef EGL_KHR_image_pixmap
|
||||||
|
|
||||||
static CoglBool
|
static CoglBool
|
||||||
@ -851,8 +833,6 @@ _cogl_winsys_egl_xlib_get_vtable (void)
|
|||||||
vtable.onscreen_x11_get_window_xid =
|
vtable.onscreen_x11_get_window_xid =
|
||||||
_cogl_winsys_onscreen_x11_get_window_xid;
|
_cogl_winsys_onscreen_x11_get_window_xid;
|
||||||
|
|
||||||
vtable.xlib_get_visual_info = _cogl_winsys_xlib_get_visual_info;
|
|
||||||
|
|
||||||
#ifdef EGL_KHR_image_pixmap
|
#ifdef EGL_KHR_image_pixmap
|
||||||
/* X11 tfp support... */
|
/* X11 tfp support... */
|
||||||
/* XXX: instead of having a rather monolithic winsys vtable we could
|
/* XXX: instead of having a rather monolithic winsys vtable we could
|
||||||
|
@ -2078,29 +2078,6 @@ _cogl_winsys_onscreen_set_resizable (CoglOnscreen *onscreen,
|
|||||||
XFree (size_hints);
|
XFree (size_hints);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* XXX: This is a particularly hacky _cogl_winsys interface... */
|
|
||||||
static XVisualInfo *
|
|
||||||
_cogl_winsys_xlib_get_visual_info (void)
|
|
||||||
{
|
|
||||||
CoglGLXDisplay *glx_display;
|
|
||||||
CoglXlibRenderer *xlib_renderer;
|
|
||||||
CoglGLXRenderer *glx_renderer;
|
|
||||||
|
|
||||||
_COGL_GET_CONTEXT (ctx, NULL);
|
|
||||||
|
|
||||||
_COGL_RETURN_VAL_IF_FAIL (ctx->display->winsys, FALSE);
|
|
||||||
|
|
||||||
glx_display = ctx->display->winsys;
|
|
||||||
xlib_renderer = _cogl_xlib_renderer_get_data (ctx->display->renderer);
|
|
||||||
glx_renderer = ctx->display->renderer->winsys;
|
|
||||||
|
|
||||||
if (!glx_display->found_fbconfig)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
return glx_renderer->glXGetVisualFromFBConfig (xlib_renderer->xdpy,
|
|
||||||
glx_display->fbconfig);
|
|
||||||
}
|
|
||||||
|
|
||||||
static CoglBool
|
static CoglBool
|
||||||
get_fbconfig_for_depth (CoglContext *context,
|
get_fbconfig_for_depth (CoglContext *context,
|
||||||
unsigned int depth,
|
unsigned int depth,
|
||||||
@ -2714,7 +2691,6 @@ static CoglWinsysVtable _cogl_winsys_vtable =
|
|||||||
.context_init = _cogl_winsys_context_init,
|
.context_init = _cogl_winsys_context_init,
|
||||||
.context_deinit = _cogl_winsys_context_deinit,
|
.context_deinit = _cogl_winsys_context_deinit,
|
||||||
.context_get_clock_time = _cogl_winsys_get_clock_time,
|
.context_get_clock_time = _cogl_winsys_get_clock_time,
|
||||||
.xlib_get_visual_info = _cogl_winsys_xlib_get_visual_info,
|
|
||||||
.onscreen_init = _cogl_winsys_onscreen_init,
|
.onscreen_init = _cogl_winsys_onscreen_init,
|
||||||
.onscreen_deinit = _cogl_winsys_onscreen_deinit,
|
.onscreen_deinit = _cogl_winsys_onscreen_deinit,
|
||||||
.onscreen_bind = _cogl_winsys_onscreen_bind,
|
.onscreen_bind = _cogl_winsys_onscreen_bind,
|
||||||
|
@ -145,11 +145,6 @@ typedef struct _CoglWinsysVtable
|
|||||||
int
|
int
|
||||||
(*onscreen_get_buffer_age) (CoglOnscreen *onscreen);
|
(*onscreen_get_buffer_age) (CoglOnscreen *onscreen);
|
||||||
|
|
||||||
#ifdef COGL_HAS_XLIB_SUPPORT
|
|
||||||
XVisualInfo *
|
|
||||||
(*xlib_get_visual_info) (void);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
uint32_t
|
uint32_t
|
||||||
(*onscreen_x11_get_window_xid) (CoglOnscreen *onscreen);
|
(*onscreen_x11_get_window_xid) (CoglOnscreen *onscreen);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user