diff options
author | Isaac Freund <ifreund@ifreund.xyz> | 2020-03-23 14:32:27 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-03-23 15:19:16 +0100 |
commit | c682d97841235cc328f044a4e2f2272f7a32b226 (patch) | |
tree | a92949600285a76af28bddda4a9f0ce410fd40e3 /render/gles2 | |
parent | 34303e1b47defc7aca518983ac3aaea6c881d112 (diff) |
Return failure of wlr_renderer_init_wl_display()
This makes it easier for the user of this library to properly handle
failure of this function.
The signature of wlr_renderer_impl.init_wl_display was also modified to
allow for proper error propagation.
Diffstat (limited to 'render/gles2')
-rw-r--r-- | render/gles2/renderer.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/render/gles2/renderer.c b/render/gles2/renderer.c index 65c2b801..9df21fcc 100644 --- a/render/gles2/renderer.c +++ b/render/gles2/renderer.c @@ -351,13 +351,15 @@ static struct wlr_texture *gles2_texture_from_dmabuf( return wlr_gles2_texture_from_dmabuf(renderer->egl, attribs); } -static void gles2_init_wl_display(struct wlr_renderer *wlr_renderer, +static bool gles2_init_wl_display(struct wlr_renderer *wlr_renderer, struct wl_display *wl_display) { struct wlr_gles2_renderer *renderer = gles2_get_renderer(wlr_renderer); if (!wlr_egl_bind_display(renderer->egl, wl_display)) { wlr_log(WLR_INFO, "failed to bind wl_display to EGL"); + return false; } + return true; } struct wlr_egl *wlr_gles2_renderer_get_egl(struct wlr_renderer *wlr_renderer) { |