aboutsummaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2024-02-22 19:37:54 +0100
committerSimon Ser <contact@emersion.fr>2024-02-23 18:52:48 +0100
commitc31d307971da6088c76fca9a057a6426cc59df22 (patch)
tree661b9606d3d40d37392719aa105e13f5a54e77d3 /render
parentd5556ec78f65c286ae281a17d7b6b2ddc38c4c00 (diff)
render/egl: drop wlr_egl_save_context()
This is no longer used.
Diffstat (limited to 'render')
-rw-r--r--render/egl.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/render/egl.c b/render/egl.c
index e8b13ce8..d2e0af9a 100644
--- a/render/egl.c
+++ b/render/egl.c
@@ -652,7 +652,10 @@ bool wlr_egl_destroy_image(struct wlr_egl *egl, EGLImage image) {
bool wlr_egl_make_current(struct wlr_egl *egl,
struct wlr_egl_context *save_context) {
if (save_context != NULL) {
- wlr_egl_save_context(save_context);
+ save_context->display = eglGetCurrentDisplay();
+ save_context->context = eglGetCurrentContext();
+ save_context->draw_surface = eglGetCurrentSurface(EGL_DRAW);
+ save_context->read_surface = eglGetCurrentSurface(EGL_READ);
}
if (!eglMakeCurrent(egl->display, EGL_NO_SURFACE, EGL_NO_SURFACE,
egl->context)) {
@@ -675,13 +678,6 @@ bool wlr_egl_is_current(struct wlr_egl *egl) {
return eglGetCurrentContext() == egl->context;
}
-void wlr_egl_save_context(struct wlr_egl_context *context) {
- context->display = eglGetCurrentDisplay();
- context->context = eglGetCurrentContext();
- context->draw_surface = eglGetCurrentSurface(EGL_DRAW);
- context->read_surface = eglGetCurrentSurface(EGL_READ);
-}
-
bool wlr_egl_restore_context(struct wlr_egl_context *context) {
// If the saved context is a null-context, we must use the current
// display instead of the saved display because eglMakeCurrent() can't