mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
render/egl: add save_context parameter to wlr_egl_make_current()
Saving the old context and immediately making our own context current is a common pattern. Let's make it easier to do. No functional change, just refactoring.
This commit is contained in:
parent
2521fba37c
commit
d5556ec78f
4 changed files with 24 additions and 33 deletions
|
|
@ -105,10 +105,10 @@ bool wlr_egl_restore_context(struct wlr_egl_context *context);
|
|||
/**
|
||||
* Make the EGL context current.
|
||||
*
|
||||
* Callers are expected to clear the current context when they are done by
|
||||
* calling wlr_egl_unset_current().
|
||||
* The old EGL context is saved. Callers are expected to clear the current
|
||||
* context when they are done by calling wlr_egl_restore_context().
|
||||
*/
|
||||
bool wlr_egl_make_current(struct wlr_egl *egl);
|
||||
bool wlr_egl_make_current(struct wlr_egl *egl, struct wlr_egl_context *save_context);
|
||||
|
||||
bool wlr_egl_unset_current(struct wlr_egl *egl);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue