mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
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.
This commit is contained in:
parent
34303e1b47
commit
c682d97841
4 changed files with 21 additions and 8 deletions
|
|
@ -62,7 +62,7 @@ struct wlr_renderer_impl {
|
|||
struct wlr_texture *(*texture_from_dmabuf)(struct wlr_renderer *renderer,
|
||||
struct wlr_dmabuf_attributes *attribs);
|
||||
void (*destroy)(struct wlr_renderer *renderer);
|
||||
void (*init_wl_display)(struct wlr_renderer *renderer,
|
||||
bool (*init_wl_display)(struct wlr_renderer *renderer,
|
||||
struct wl_display *wl_display);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -109,7 +109,12 @@ bool wlr_renderer_read_pixels(struct wlr_renderer *r, enum wl_shm_format fmt,
|
|||
*/
|
||||
bool wlr_renderer_format_supported(struct wlr_renderer *r,
|
||||
enum wl_shm_format fmt);
|
||||
void wlr_renderer_init_wl_display(struct wlr_renderer *r,
|
||||
/**
|
||||
* Creates necessary shm and invokes the initialization of the implementation.
|
||||
*
|
||||
* Returns false on failure.
|
||||
*/
|
||||
bool wlr_renderer_init_wl_display(struct wlr_renderer *r,
|
||||
struct wl_display *wl_display);
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue