aboutsummaryrefslogtreecommitdiff
path: root/include/wlr/render
diff options
context:
space:
mode:
authorIlia Bozhinov <ammen99@gmail.com>2018-05-25 13:14:35 +0300
committerIlia Bozhinov <ammen99@gmail.com>2018-05-25 14:56:52 +0300
commit24cf70ae9691d605e4a1f7e9d8dc59ec72401bd0 (patch)
tree93d550e437722bdeabca5605ada5c0b4d41128cf /include/wlr/render
parenta0eb37e2ea4ad96b4f6e98fddbc5c31d0bd0f293 (diff)
backends: implement custom EGL and renderer initialization
Compositors now have more control over how the backend creates its renderer. Currently all backends create an EGL/GLES2 renderer, so the necessary attributes for creating the context are passed to a user-provided callback function. It is responsible for initializing provided wlr_egl and to return a renderer. On fail, return 0. Fixes #987
Diffstat (limited to 'include/wlr/render')
-rw-r--r--include/wlr/render/wlr_renderer.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/wlr/render/wlr_renderer.h b/include/wlr/render/wlr_renderer.h
index 21f9c16c..ec87201b 100644
--- a/include/wlr/render/wlr_renderer.h
+++ b/include/wlr/render/wlr_renderer.h
@@ -3,6 +3,7 @@
#include <stdint.h>
#include <wayland-server-protocol.h>
+#include <wlr/render/egl.h>
#include <wlr/render/wlr_texture.h>
#include <wlr/types/wlr_box.h>
@@ -16,6 +17,9 @@ struct wlr_renderer {
} events;
};
+struct wlr_renderer *wlr_renderer_autocreate(struct wlr_egl *egl, EGLenum platform,
+ void *remote_display, EGLint *config_attribs, EGLint visual_id);
+
void wlr_renderer_begin(struct wlr_renderer *r, int width, int height);
void wlr_renderer_end(struct wlr_renderer *r);
void wlr_renderer_clear(struct wlr_renderer *r, const float color[static 4]);