aboutsummaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-02-13 08:30:54 -0500
committerGitHub <noreply@github.com>2018-02-13 08:30:54 -0500
commit71cba94e73022d8cef8651055204a4706377ae11 (patch)
tree8ea1a2b6a0414fd7904824ffac330cd4e1e96ca2 /render
parent3497e53516d96ad67b26115e2e06218f68e1114d (diff)
parentc2e147401048aa53aebd52f1851b1da8c91043a3 (diff)
Merge pull request #627 from emersion/wlr-signal-emit-safe
Remove wlr_backend.events.{output_remove,device_remove}
Diffstat (limited to 'render')
-rw-r--r--render/egl.c4
-rw-r--r--render/gles2/renderer.c6
-rw-r--r--render/gles2/shaders.c2
-rw-r--r--render/gles2/texture.c9
-rw-r--r--render/gles2/util.c4
-rw-r--r--render/matrix.c4
-rw-r--r--render/meson.build2
-rw-r--r--render/wlr_renderer.c2
-rw-r--r--render/wlr_texture.c2
9 files changed, 18 insertions, 17 deletions
diff --git a/render/egl.c b/render/egl.c
index 328726ba..f1208a72 100644
--- a/render/egl.c
+++ b/render/egl.c
@@ -1,10 +1,10 @@
#include <assert.h>
-#include <stdlib.h>
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <GLES2/gl2.h>
-#include <wlr/util/log.h>
+#include <stdlib.h>
#include <wlr/render/egl.h>
+#include <wlr/util/log.h>
#include "glapi.h"
// Extension documentation
diff --git a/render/gles2/renderer.c b/render/gles2/renderer.c
index f57e9dae..81a932e6 100644
--- a/render/gles2/renderer.c
+++ b/render/gles2/renderer.c
@@ -1,10 +1,10 @@
-#include <stdint.h>
-#include <stdlib.h>
#include <assert.h>
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
-#include <wayland-util.h>
+#include <stdint.h>
+#include <stdlib.h>
#include <wayland-server-protocol.h>
+#include <wayland-util.h>
#include <wlr/backend.h>
#include <wlr/render.h>
#include <wlr/render/egl.h>
diff --git a/render/gles2/shaders.c b/render/gles2/shaders.c
index ff6fba9c..46a10248 100644
--- a/render/gles2/shaders.c
+++ b/render/gles2/shaders.c
@@ -1,5 +1,5 @@
-#include "render/gles2.h"
#include <GLES2/gl2.h>
+#include "render/gles2.h"
// Colored quads
const GLchar quad_vertex_src[] =
diff --git a/render/gles2/texture.c b/render/gles2/texture.c
index ff71cb08..688a51d8 100644
--- a/render/gles2/texture.c
+++ b/render/gles2/texture.c
@@ -1,16 +1,17 @@
-#include <stdint.h>
-#include <stdlib.h>
#include <assert.h>
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
-#include <wayland-util.h>
+#include <stdint.h>
+#include <stdlib.h>
#include <wayland-server-protocol.h>
+#include <wayland-util.h>
#include <wlr/render.h>
#include <wlr/render/egl.h>
#include <wlr/render/interface.h>
#include <wlr/render/matrix.h>
#include <wlr/util/log.h>
#include "render/gles2.h"
+#include "util/signal.h"
static struct pixel_format external_pixel_format = {
.wl_format = 0,
@@ -271,7 +272,7 @@ static void gles2_texture_bind(struct wlr_texture *_texture) {
static void gles2_texture_destroy(struct wlr_texture *_texture) {
struct wlr_gles2_texture *texture = (struct wlr_gles2_texture *)_texture;
- wl_signal_emit(&texture->wlr_texture.destroy_signal, &texture->wlr_texture);
+ wlr_signal_emit_safe(&texture->wlr_texture.destroy_signal, &texture->wlr_texture);
if (texture->tex_id) {
GL_CALL(glDeleteTextures(1, &texture->tex_id));
}
diff --git a/render/gles2/util.c b/render/gles2/util.c
index 9498a1cd..c291f533 100644
--- a/render/gles2/util.c
+++ b/render/gles2/util.c
@@ -1,6 +1,6 @@
-#include <stdlib.h>
-#include <stdbool.h>
#include <GLES2/gl2.h>
+#include <stdbool.h>
+#include <stdlib.h>
#include <wlr/util/log.h>
#include "render/gles2.h"
diff --git a/render/matrix.c b/render/matrix.c
index fa45dd04..d5d7f49d 100644
--- a/render/matrix.c
+++ b/render/matrix.c
@@ -1,9 +1,9 @@
-#include <string.h>
#include <math.h>
+#include <string.h>
#include <wayland-server-protocol.h>
+#include <wlr/render/matrix.h>
#include <wlr/types/wlr_box.h>
#include <wlr/types/wlr_output.h>
-#include <wlr/render/matrix.h>
/* Obtains the index for the given row/column */
static inline int mind(int row, int col) {
diff --git a/render/meson.build b/render/meson.build
index 309e83cd..1a5a85b8 100644
--- a/render/meson.build
+++ b/render/meson.build
@@ -10,12 +10,12 @@ lib_wlr_render = static_library(
'wlr_render',
files(
'egl.c',
- 'matrix.c',
'gles2/pixel_format.c',
'gles2/renderer.c',
'gles2/shaders.c',
'gles2/texture.c',
'gles2/util.c',
+ 'matrix.c',
'wlr_renderer.c',
'wlr_texture.c',
),
diff --git a/render/wlr_renderer.c b/render/wlr_renderer.c
index c8f06a64..fa6c6fc3 100644
--- a/render/wlr_renderer.c
+++ b/render/wlr_renderer.c
@@ -1,5 +1,5 @@
-#include <stdlib.h>
#include <stdbool.h>
+#include <stdlib.h>
#include <wlr/render/interface.h>
void wlr_renderer_init(struct wlr_renderer *renderer,
diff --git a/render/wlr_texture.c b/render/wlr_texture.c
index 4ce86bdd..a82a16b2 100644
--- a/render/wlr_texture.c
+++ b/render/wlr_texture.c
@@ -1,5 +1,5 @@
-#include <stdlib.h>
#include <stdbool.h>
+#include <stdlib.h>
#include <wlr/render/interface.h>
void wlr_texture_init(struct wlr_texture *texture,