aboutsummaryrefslogtreecommitdiff
path: root/render/gles2
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-05-25 13:54:16 +0100
committerGitHub <noreply@github.com>2018-05-25 13:54:16 +0100
commit6eb4b5b54d8640115764401822787c6e9c88697c (patch)
treec57602b7f8e910f974805f980629e2747a53f90b /render/gles2
parent35b31dcfb7f54c08301c4eb352325bb852b1bece (diff)
parent41130fe54bfed6c3a5171bbc225143c32cbefc70 (diff)
Merge pull request #993 from emersion/bind-wl-drm-in-renderer
render: bind wl_drm in renderer
Diffstat (limited to 'render/gles2')
-rw-r--r--render/gles2/renderer.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/render/gles2/renderer.c b/render/gles2/renderer.c
index 8360c5fb..5cea5c3b 100644
--- a/render/gles2/renderer.c
+++ b/render/gles2/renderer.c
@@ -304,6 +304,15 @@ static struct wlr_texture *gles2_texture_from_dmabuf(
return wlr_gles2_texture_from_dmabuf(renderer->egl, attribs);
}
+static void gles2_init_wl_display(struct wlr_renderer *wlr_renderer,
+ struct wl_display *wl_display) {
+ struct wlr_gles2_renderer *renderer =
+ gles2_get_renderer_in_context(wlr_renderer);
+ if (!wlr_egl_bind_display(renderer->egl, wl_display)) {
+ wlr_log(L_INFO, "failed to bind wl_display to EGL");
+ }
+}
+
static void gles2_destroy(struct wlr_renderer *wlr_renderer) {
struct wlr_gles2_renderer *renderer = gles2_get_renderer(wlr_renderer);
@@ -345,6 +354,7 @@ static const struct wlr_renderer_impl renderer_impl = {
.texture_from_pixels = gles2_texture_from_pixels,
.texture_from_wl_drm = gles2_texture_from_wl_drm,
.texture_from_dmabuf = gles2_texture_from_dmabuf,
+ .init_wl_display = gles2_init_wl_display,
};
void push_gles2_marker(const char *file, const char *func) {