render/egl: remove SURFACELESS_MESA special case

Users can just pass EGL_DEFAULT_DISPLAY themselves.
This commit is contained in:
Simon Ser 2020-01-11 17:45:49 +01:00 committed by Drew DeVault
parent 3b35043d00
commit 2b04857343
2 changed files with 4 additions and 9 deletions

View File

@ -113,7 +113,8 @@ struct wlr_backend *wlr_headless_backend_create(struct wl_display *display,
} }
backend->renderer = create_renderer_func(&backend->egl, 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) { if (!backend->renderer) {
wlr_log(WLR_ERROR, "Failed to create renderer"); wlr_log(WLR_ERROR, "Failed to create renderer");
free(backend); free(backend);

View File

@ -170,14 +170,8 @@ bool wlr_egl_init(struct wlr_egl *egl, EGLenum platform, void *remote_display,
goto error; goto error;
} }
if (platform == EGL_PLATFORM_SURFACELESS_MESA) { egl->display = egl->procs.eglGetPlatformDisplayEXT(platform,
assert(remote_display == NULL); remote_display, NULL);
egl->display = egl->procs.eglGetPlatformDisplayEXT(platform,
EGL_DEFAULT_DISPLAY, NULL);
} else {
egl->display = egl->procs.eglGetPlatformDisplayEXT(platform,
remote_display, NULL);
}
if (egl->display == EGL_NO_DISPLAY) { if (egl->display == EGL_NO_DISPLAY) {
wlr_log(WLR_ERROR, "Failed to create EGL display"); wlr_log(WLR_ERROR, "Failed to create EGL display");
goto error; goto error;