1
0
Fork 0

cogl: Don't allow overriding renderer winsys_id

It is an API that no longer makes sense, as Cogl is only usable inside of Mutter

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3781>
This commit is contained in:
Bilal Elmoussaoui 2024-05-26 16:11:47 +02:00
parent dad9f64b5f
commit c506c194b6
3 changed files with 0 additions and 33 deletions

View file

@ -50,7 +50,6 @@ struct _CoglRenderer
const CoglWinsysVtable *winsys_vtable;
void *custom_winsys_user_data;
CoglCustomWinsysVtableGetter custom_winsys_vtable_getter;
CoglWinsysID winsys_id_override;
GArray *poll_fds;
int poll_fds_age;

View file

@ -522,12 +522,6 @@ cogl_renderer_connect (CoglRenderer *renderer, GError **error)
const CoglWinsysVtable *winsys = _cogl_winsys_vtable_getters[i]();
GError *tmp_error = NULL;
if (renderer->winsys_id_override != COGL_WINSYS_ID_ANY)
{
if (renderer->winsys_id_override != winsys->id)
continue;
}
/* At least temporarily we will associate this winsys with
* the renderer in-case ->renderer_connect calls API that
* wants to query the current winsys... */
@ -629,15 +623,6 @@ _cogl_renderer_remove_native_filter (CoglRenderer *renderer,
}
}
void
cogl_renderer_set_winsys_id (CoglRenderer *renderer,
CoglWinsysID winsys_id)
{
g_return_if_fail (!renderer->connected);
renderer->winsys_id_override = winsys_id;
}
CoglWinsysID
cogl_renderer_get_winsys_id (CoglRenderer *renderer)
{

View file

@ -143,23 +143,6 @@ typedef enum
COGL_WINSYS_ID_CUSTOM,
} CoglWinsysID;
/**
* cogl_renderer_set_winsys_id:
* @renderer: A #CoglRenderer
* @winsys_id: An ID of the winsys you explicitly want to use.
*
* This allows you to explicitly select a winsys backend to use instead
* of letting Cogl automatically select a backend.
*
* if you select an unsupported backend then cogl_renderer_connect()
* will fail and report an error.
*
* This may only be called on an un-connected #CoglRenderer.
*/
COGL_EXPORT void
cogl_renderer_set_winsys_id (CoglRenderer *renderer,
CoglWinsysID winsys_id);
/**
* cogl_renderer_get_winsys_id:
* @renderer: A #CoglRenderer