mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 21:05:58 +01:00
Pass backend to render
This commit is contained in:
parent
bdeffad7e5
commit
37b8a096a9
2 changed files with 4 additions and 6 deletions
|
@ -246,9 +246,8 @@ struct wlr_renderer *wlr_gles2_renderer_create(struct wlr_backend *backend) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
wlr_renderer_init(&renderer->wlr_renderer, &wlr_renderer_impl);
|
wlr_renderer_init(&renderer->wlr_renderer, &wlr_renderer_impl);
|
||||||
if (backend) {
|
|
||||||
struct wlr_egl *egl = wlr_backend_get_egl(backend);
|
renderer->egl = wlr_backend_get_egl(backend);
|
||||||
renderer->egl = egl;
|
|
||||||
}
|
|
||||||
return &renderer->wlr_renderer;
|
return &renderer->wlr_renderer;
|
||||||
}
|
}
|
||||||
|
|
|
@ -153,8 +153,7 @@ static bool set_cursor(struct wlr_output *output, const uint8_t *buf,
|
||||||
output->cursor.height = height;
|
output->cursor.height = height;
|
||||||
|
|
||||||
if (!output->cursor.renderer) {
|
if (!output->cursor.renderer) {
|
||||||
/* NULL egl is okay given that we are only using pixel buffers */
|
output->cursor.renderer = wlr_gles2_renderer_create(output->backend);
|
||||||
output->cursor.renderer = wlr_gles2_renderer_create(NULL);
|
|
||||||
if (!output->cursor.renderer) {
|
if (!output->cursor.renderer) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue