diff options
author | Simon Ser <contact@emersion.fr> | 2021-06-01 15:55:30 +0200 |
---|---|---|
committer | Simon Zeni <simon@bl4ckb0ne.ca> | 2021-06-01 13:12:28 -0400 |
commit | 6430230d1fdab4c056300375606389d2b655f50b (patch) | |
tree | 73b58abb3eac032b05ac7daf4e3c6e1b2cb1ded8 /include/wlr/render/wlr_renderer.h | |
parent | b732f094c63e7b1f740a9ef48072a2172e8669da (diff) |
render: add wlr_renderer_begin_with_buffer
This allows compositors to choose a wlr_buffer to render to. This
is a less awkward interface than having to call bind_buffer() before
and after begin() and end().
Closes: https://github.com/swaywm/wlroots/issues/2618
Diffstat (limited to 'include/wlr/render/wlr_renderer.h')
-rw-r--r-- | include/wlr/render/wlr_renderer.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/wlr/render/wlr_renderer.h b/include/wlr/render/wlr_renderer.h index 56b03c1b..e9f8c4e2 100644 --- a/include/wlr/render/wlr_renderer.h +++ b/include/wlr/render/wlr_renderer.h @@ -27,6 +27,7 @@ struct wlr_renderer { const struct wlr_renderer_impl *impl; bool rendering; + bool rendering_with_buffer; struct { struct wl_signal destroy; @@ -36,6 +37,8 @@ struct wlr_renderer { struct wlr_renderer *wlr_renderer_autocreate(struct wlr_backend *backend); void wlr_renderer_begin(struct wlr_renderer *r, uint32_t width, uint32_t height); +bool wlr_renderer_begin_with_buffer(struct wlr_renderer *r, + struct wlr_buffer *buffer); void wlr_renderer_end(struct wlr_renderer *r); void wlr_renderer_clear(struct wlr_renderer *r, const float color[static 4]); /** |