diff options
author | Simon Ser <contact@emersion.fr> | 2024-02-22 19:26:06 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2024-02-23 18:52:48 +0100 |
commit | d5556ec78f65c286ae281a17d7b6b2ddc38c4c00 (patch) | |
tree | 94c083203c65b621f9ee8a5b58cd8f95d1ee04f5 /include/render/egl.h | |
parent | 2521fba37c396909eec6da88070ec9111aa2c507 (diff) |
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.
Diffstat (limited to 'include/render/egl.h')
-rw-r--r-- | include/render/egl.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/render/egl.h b/include/render/egl.h index e8b85964..3467ac59 100644 --- a/include/render/egl.h +++ b/include/render/egl.h @@ -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); |