mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
backend: remove wlr_backend_get_egl
This commit is contained in:
parent
f4125220a5
commit
d2ebbd103c
16 changed files with 127 additions and 111 deletions
|
|
@ -47,13 +47,6 @@ void wlr_backend_destroy(struct wlr_backend *backend) {
|
|||
}
|
||||
}
|
||||
|
||||
struct wlr_egl *wlr_backend_get_egl(struct wlr_backend *backend) {
|
||||
if (backend->impl->get_egl) {
|
||||
return backend->impl->get_egl(backend);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
struct wlr_renderer *wlr_backend_get_renderer(struct wlr_backend *backend) {
|
||||
if (backend->impl->get_renderer) {
|
||||
return backend->impl->get_renderer(backend);
|
||||
|
|
|
|||
|
|
@ -48,11 +48,6 @@ static void wlr_drm_backend_destroy(struct wlr_backend *backend) {
|
|||
free(drm);
|
||||
}
|
||||
|
||||
static struct wlr_egl *wlr_drm_backend_get_egl(struct wlr_backend *backend) {
|
||||
struct wlr_drm_backend *drm = (struct wlr_drm_backend *)backend;
|
||||
return &drm->renderer.egl;
|
||||
}
|
||||
|
||||
static struct wlr_renderer *wlr_drm_backend_get_renderer(
|
||||
struct wlr_backend *backend) {
|
||||
struct wlr_drm_backend *drm = (struct wlr_drm_backend *)backend;
|
||||
|
|
@ -62,7 +57,6 @@ static struct wlr_renderer *wlr_drm_backend_get_renderer(
|
|||
static struct wlr_backend_impl backend_impl = {
|
||||
.start = wlr_drm_backend_start,
|
||||
.destroy = wlr_drm_backend_destroy,
|
||||
.get_egl = wlr_drm_backend_get_egl,
|
||||
.get_renderer = wlr_drm_backend_get_renderer,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -58,12 +58,6 @@ static void backend_destroy(struct wlr_backend *wlr_backend) {
|
|||
free(backend);
|
||||
}
|
||||
|
||||
static struct wlr_egl *backend_get_egl(struct wlr_backend *wlr_backend) {
|
||||
struct wlr_headless_backend *backend =
|
||||
(struct wlr_headless_backend *)wlr_backend;
|
||||
return &backend->egl;
|
||||
}
|
||||
|
||||
static struct wlr_renderer *backend_get_renderer(
|
||||
struct wlr_backend *wlr_backend) {
|
||||
struct wlr_headless_backend *backend =
|
||||
|
|
@ -74,7 +68,6 @@ static struct wlr_renderer *backend_get_renderer(
|
|||
static const struct wlr_backend_impl backend_impl = {
|
||||
.start = backend_start,
|
||||
.destroy = backend_destroy,
|
||||
.get_egl = backend_get_egl,
|
||||
.get_renderer = backend_get_renderer,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -52,18 +52,6 @@ static void multi_backend_destroy(struct wlr_backend *wlr_backend) {
|
|||
free(backend);
|
||||
}
|
||||
|
||||
static struct wlr_egl *multi_backend_get_egl(struct wlr_backend *wlr_backend) {
|
||||
struct wlr_multi_backend *backend = (struct wlr_multi_backend *)wlr_backend;
|
||||
struct subbackend_state *sub;
|
||||
wl_list_for_each(sub, &backend->backends, link) {
|
||||
struct wlr_egl *egl = wlr_backend_get_egl(sub->backend);
|
||||
if (egl) {
|
||||
return egl;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static struct wlr_renderer *multi_backend_get_renderer(
|
||||
struct wlr_backend *backend) {
|
||||
struct wlr_multi_backend *multi = (struct wlr_multi_backend *)backend;
|
||||
|
|
@ -80,7 +68,6 @@ static struct wlr_renderer *multi_backend_get_renderer(
|
|||
struct wlr_backend_impl backend_impl = {
|
||||
.start = multi_backend_start,
|
||||
.destroy = multi_backend_destroy,
|
||||
.get_egl = multi_backend_get_egl,
|
||||
.get_renderer = multi_backend_get_renderer,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -110,11 +110,6 @@ static void wlr_wl_backend_destroy(struct wlr_backend *wlr_backend) {
|
|||
free(backend);
|
||||
}
|
||||
|
||||
static struct wlr_egl *wlr_wl_backend_get_egl(struct wlr_backend *wlr_backend) {
|
||||
struct wlr_wl_backend *backend = (struct wlr_wl_backend *)wlr_backend;
|
||||
return &backend->egl;
|
||||
}
|
||||
|
||||
static struct wlr_renderer *wlr_wl_backend_get_renderer(
|
||||
struct wlr_backend *wlr_backend) {
|
||||
struct wlr_wl_backend *backend = (struct wlr_wl_backend *)wlr_backend;
|
||||
|
|
@ -124,7 +119,6 @@ static struct wlr_renderer *wlr_wl_backend_get_renderer(
|
|||
static struct wlr_backend_impl backend_impl = {
|
||||
.start = wlr_wl_backend_start,
|
||||
.destroy = wlr_wl_backend_destroy,
|
||||
.get_egl = wlr_wl_backend_get_egl,
|
||||
.get_renderer = wlr_wl_backend_get_renderer,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -257,11 +257,6 @@ static void wlr_x11_backend_destroy(struct wlr_backend *backend) {
|
|||
free(x11);
|
||||
}
|
||||
|
||||
static struct wlr_egl *wlr_x11_backend_get_egl(struct wlr_backend *backend) {
|
||||
struct wlr_x11_backend *x11 = (struct wlr_x11_backend *)backend;
|
||||
return &x11->egl;
|
||||
}
|
||||
|
||||
static struct wlr_renderer *wlr_x11_backend_get_renderer(
|
||||
struct wlr_backend *backend) {
|
||||
struct wlr_x11_backend *x11 = (struct wlr_x11_backend *)backend;
|
||||
|
|
@ -271,7 +266,6 @@ static struct wlr_renderer *wlr_x11_backend_get_renderer(
|
|||
static const struct wlr_backend_impl backend_impl = {
|
||||
.start = wlr_x11_backend_start,
|
||||
.destroy = wlr_x11_backend_destroy,
|
||||
.get_egl = wlr_x11_backend_get_egl,
|
||||
.get_renderer = wlr_x11_backend_get_renderer,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue