Minimal working headless output

This commit is contained in:
emersion 2017-12-17 13:35:07 +01:00
parent 3970264ccf
commit b852fb9a2b
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
3 changed files with 51 additions and 8 deletions

View file

@ -26,6 +26,9 @@ static void backend_destroy(struct wlr_backend *wlr_backend) {
}
wl_list_remove(&backend->display_destroy.link);
// TODO: destroy outputs
wlr_egl_finish(&backend->egl);
free(backend);
}
@ -61,6 +64,12 @@ static bool egl_get_config(EGLDisplay disp, EGLConfig *out) {
static const EGLint attribs[] = {
EGL_SURFACE_TYPE, EGL_PBUFFER_BIT,
EGL_BUFFER_SIZE, 32,
EGL_ALPHA_SIZE, 0,
EGL_BLUE_SIZE, 8,
EGL_GREEN_SIZE, 8,
EGL_RED_SIZE, 8,
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
EGL_NONE,
};
@ -146,6 +155,7 @@ struct wlr_backend *wlr_headless_backend_create(struct wl_display *display) {
}
wlr_backend_init(&backend->backend, &backend_impl);
backend->display = display;
wl_list_init(&backend->outputs);
egl_init(&backend->egl);