From c88c54fb385a9fe29f79db2ece3e8ebba0edd0a3 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 28 Jul 2020 16:56:18 +0200 Subject: render: introduce wlr_renderer_bind_buffer --- render/wlr_renderer.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'render') diff --git a/render/wlr_renderer.c b/render/wlr_renderer.c index bdcc836f..311747f1 100644 --- a/render/wlr_renderer.c +++ b/render/wlr_renderer.c @@ -7,6 +7,7 @@ #include #include #include "util/signal.h" +#include "render/wlr_renderer.h" void wlr_renderer_init(struct wlr_renderer *renderer, const struct wlr_renderer_impl *impl) { @@ -37,6 +38,15 @@ void wlr_renderer_destroy(struct wlr_renderer *r) { } } +bool wlr_renderer_bind_buffer(struct wlr_renderer *r, + struct wlr_buffer *buffer) { + assert(!r->rendering); + if (!r->impl->bind_buffer) { + return false; + } + return r->impl->bind_buffer(r, buffer); +} + void wlr_renderer_begin(struct wlr_renderer *r, uint32_t width, uint32_t height) { assert(!r->rendering); -- cgit v1.2.3