diff options
author | Simon Ser <contact@emersion.fr> | 2020-01-11 17:45:49 +0100 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2020-01-12 10:10:09 -0700 |
commit | 2b04857343732b6aa7b8c4512387560f7f936aa9 (patch) | |
tree | 02cfe6d78b8b963e994128fb7249185ded600dd3 | |
parent | 3b35043d00120ddfa40ced302f941067c5583f53 (diff) |
render/egl: remove SURFACELESS_MESA special case
Users can just pass EGL_DEFAULT_DISPLAY themselves.
-rw-r--r-- | backend/headless/backend.c | 3 | ||||
-rw-r--r-- | render/egl.c | 10 |
2 files changed, 4 insertions, 9 deletions
diff --git a/backend/headless/backend.c b/backend/headless/backend.c index d6bb141a..7b189f49 100644 --- a/backend/headless/backend.c +++ b/backend/headless/backend.c @@ -113,7 +113,8 @@ struct wlr_backend *wlr_headless_backend_create(struct wl_display *display, } backend->renderer = create_renderer_func(&backend->egl, - EGL_PLATFORM_SURFACELESS_MESA, NULL, (EGLint*)config_attribs, 0); + EGL_PLATFORM_SURFACELESS_MESA, EGL_DEFAULT_DISPLAY, + (EGLint*)config_attribs, 0); if (!backend->renderer) { wlr_log(WLR_ERROR, "Failed to create renderer"); free(backend); diff --git a/render/egl.c b/render/egl.c index 088c4ad7..de6d6b1b 100644 --- a/render/egl.c +++ b/render/egl.c @@ -170,14 +170,8 @@ bool wlr_egl_init(struct wlr_egl *egl, EGLenum platform, void *remote_display, goto error; } - if (platform == EGL_PLATFORM_SURFACELESS_MESA) { - assert(remote_display == NULL); - egl->display = egl->procs.eglGetPlatformDisplayEXT(platform, - EGL_DEFAULT_DISPLAY, NULL); - } else { - egl->display = egl->procs.eglGetPlatformDisplayEXT(platform, - remote_display, NULL); - } + egl->display = egl->procs.eglGetPlatformDisplayEXT(platform, + remote_display, NULL); if (egl->display == EGL_NO_DISPLAY) { wlr_log(WLR_ERROR, "Failed to create EGL display"); goto error; |