From 346b43e937340423901502fccb30f397e93efd5f Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Sat, 28 Dec 2019 11:53:11 +0100 Subject: render: guard rendering operations between begin() and end() Add a wlr_renderer.rendering bool, set it to true between wlr_renderer_begin() and wlr_renderer_end(). Assert we're rendering when calling functions that render. --- include/wlr/render/wlr_renderer.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/wlr/render/wlr_renderer.h b/include/wlr/render/wlr_renderer.h index 522ce738..54e6506e 100644 --- a/include/wlr/render/wlr_renderer.h +++ b/include/wlr/render/wlr_renderer.h @@ -25,6 +25,8 @@ struct wlr_drm_format_set; struct wlr_renderer { const struct wlr_renderer_impl *impl; + bool rendering; + struct { struct wl_signal destroy; } events; -- cgit v1.2.3