From fdab81e1c95f872e61ab6ff4be65f09fe552f6f2 Mon Sep 17 00:00:00 2001 From: nyorain Date: Mon, 17 Jul 2017 20:38:28 +0200 Subject: Use meson build system --- render/CMakeLists.txt | 10 ---------- render/gles2/renderer.c | 6 +++++- render/meson.build | 10 ++++++++++ 3 files changed, 15 insertions(+), 11 deletions(-) delete mode 100644 render/CMakeLists.txt create mode 100644 render/meson.build (limited to 'render') diff --git a/render/CMakeLists.txt b/render/CMakeLists.txt deleted file mode 100644 index d412ddbc..00000000 --- a/render/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -add_library(wlr-render - matrix.c - wlr_renderer.c - wlr_surface.c - gles2/shaders.c - gles2/renderer.c - gles2/surface.c - gles2/pixel_format.c - gles2/util.c -) diff --git a/render/gles2/renderer.c b/render/gles2/renderer.c index 897dc3b8..f2a57a56 100644 --- a/render/gles2/renderer.c +++ b/render/gles2/renderer.c @@ -123,7 +123,11 @@ static void draw_quad() { static bool wlr_gles2_render_surface(struct wlr_renderer_state *state, struct wlr_surface *surface, const float (*matrix)[16]) { - assert(surface && surface->valid); + if(!surface || !surface->valid) { + wlr_log(L_ERROR, "attempt to render invalid surface"); + return false; + } + wlr_surface_bind(surface); GL_CALL(glUniformMatrix4fv(0, 1, GL_FALSE, *matrix)); // TODO: source alpha from somewhere else I guess diff --git a/render/meson.build b/render/meson.build new file mode 100644 index 00000000..2fdba62c --- /dev/null +++ b/render/meson.build @@ -0,0 +1,10 @@ +wlr_files += files( + 'matrix.c', + 'wlr_renderer.c', + 'wlr_surface.c', + 'gles2/pixel_format.c', + 'gles2/renderer.c', + 'gles2/shaders.c', + 'gles2/surface.c', + 'gles2/util.c', +) -- cgit v1.2.3