mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
render/egl: unset current context after swapping buffers
After swapping buffers, it doesn't make sense to perform more rendering operations. Unset the context to reflect this. This commit makes it so the context is always only current between wlr_egl_make_current and wlr_egl_swap_buffers. This is an alternative to [1]. [1]: https://github.com/swaywm/wlroots/pull/2212
This commit is contained in:
parent
72f28ed0b3
commit
af2f69e6c1
5 changed files with 2 additions and 14 deletions
|
|
@ -300,8 +300,6 @@ static bool output_commit(struct wlr_output *wlr_output) {
|
|||
}
|
||||
}
|
||||
|
||||
wlr_egl_unset_current(&output->backend->egl);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -377,7 +375,6 @@ static bool output_set_cursor(struct wlr_output *wlr_output,
|
|||
|
||||
wlr_egl_swap_buffers(&backend->egl, egl_surface, NULL);
|
||||
wlr_egl_destroy_surface(&backend->egl, egl_surface);
|
||||
wlr_egl_unset_current(&backend->egl);
|
||||
} else {
|
||||
wl_surface_attach(surface, NULL, 0, 0);
|
||||
wl_surface_commit(surface);
|
||||
|
|
@ -584,7 +581,6 @@ struct wlr_output *wlr_wl_output_create(struct wlr_backend *wlr_backend) {
|
|||
NULL)) {
|
||||
goto error;
|
||||
}
|
||||
wlr_egl_unset_current(&output->backend->egl);
|
||||
|
||||
wl_list_insert(&backend->outputs, &output->link);
|
||||
wlr_output_update_enabled(wlr_output, true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue