render: allow wlr_renderer_impl.begin to fail

Make it return a bool to indicate success/failure. Adapt the
various implementations to check errors.
This commit is contained in:
Simon Ser 2022-01-12 18:30:59 +01:00 committed by Simon Zeni
parent 4a70172e26
commit 23540b5579
4 changed files with 29 additions and 11 deletions

View file

@ -22,7 +22,7 @@ struct wlr_fbox;
struct wlr_renderer_impl {
bool (*bind_buffer)(struct wlr_renderer *renderer,
struct wlr_buffer *buffer);
void (*begin)(struct wlr_renderer *renderer, uint32_t width,
bool (*begin)(struct wlr_renderer *renderer, uint32_t width,
uint32_t height);
void (*end)(struct wlr_renderer *renderer);
void (*clear)(struct wlr_renderer *renderer, const float color[static 4]);