diff options
author | Simon Ser <contact@emersion.fr> | 2022-11-26 20:13:31 +0100 |
---|---|---|
committer | Simon Zeni <simon@bl4ckb0ne.ca> | 2022-11-28 13:28:15 -0500 |
commit | 5b64e2fc31ede4777343e06087d7b921b28be674 (patch) | |
tree | ba41e4c743f21799bbbccaf9a4dffabe86ff2828 /sway/desktop/render.c | |
parent | Translate README to Czech (diff) | |
download | sway-5b64e2fc31ede4777343e06087d7b921b28be674.tar.gz sway-5b64e2fc31ede4777343e06087d7b921b28be674.tar.zst sway-5b64e2fc31ede4777343e06087d7b921b28be674.zip |
Make GLES2 optional
Diffstat (limited to 'sway/desktop/render.c')
-rw-r--r-- | sway/desktop/render.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sway/desktop/render.c b/sway/desktop/render.c index efa3a0d9..ea9c37d9 100644 --- a/sway/desktop/render.c +++ b/sway/desktop/render.c | |||
@@ -1,11 +1,10 @@ | |||
1 | #define _POSIX_C_SOURCE 200809L | 1 | #define _POSIX_C_SOURCE 200809L |
2 | #include <assert.h> | 2 | #include <assert.h> |
3 | #include <GLES2/gl2.h> | ||
4 | #include <stdlib.h> | 3 | #include <stdlib.h> |
5 | #include <strings.h> | 4 | #include <strings.h> |
6 | #include <time.h> | 5 | #include <time.h> |
7 | #include <wayland-server-core.h> | 6 | #include <wayland-server-core.h> |
8 | #include <wlr/render/gles2.h> | 7 | #include <wlr/config.h> |
9 | #include <wlr/render/wlr_renderer.h> | 8 | #include <wlr/render/wlr_renderer.h> |
10 | #include <wlr/types/wlr_buffer.h> | 9 | #include <wlr/types/wlr_buffer.h> |
11 | #include <wlr/types/wlr_damage_ring.h> | 10 | #include <wlr/types/wlr_damage_ring.h> |
@@ -28,6 +27,10 @@ | |||
28 | #include "sway/tree/view.h" | 27 | #include "sway/tree/view.h" |
29 | #include "sway/tree/workspace.h" | 28 | #include "sway/tree/workspace.h" |
30 | 29 | ||
30 | #if WLR_HAS_GLES2_RENDERER | ||
31 | #include <wlr/render/gles2.h> | ||
32 | #endif | ||
33 | |||
31 | struct render_data { | 34 | struct render_data { |
32 | pixman_region32_t *damage; | 35 | pixman_region32_t *damage; |
33 | float alpha; | 36 | float alpha; |
@@ -74,6 +77,7 @@ static void scissor_output(struct wlr_output *wlr_output, | |||
74 | 77 | ||
75 | static void set_scale_filter(struct wlr_output *wlr_output, | 78 | static void set_scale_filter(struct wlr_output *wlr_output, |
76 | struct wlr_texture *texture, enum scale_filter_mode scale_filter) { | 79 | struct wlr_texture *texture, enum scale_filter_mode scale_filter) { |
80 | #if WLR_HAS_GLES2_RENDERER | ||
77 | if (!wlr_texture_is_gles2(texture)) { | 81 | if (!wlr_texture_is_gles2(texture)) { |
78 | return; | 82 | return; |
79 | } | 83 | } |
@@ -94,6 +98,7 @@ static void set_scale_filter(struct wlr_output *wlr_output, | |||
94 | case SCALE_FILTER_SMART: | 98 | case SCALE_FILTER_SMART: |
95 | assert(false); // unreachable | 99 | assert(false); // unreachable |
96 | } | 100 | } |
101 | #endif | ||
97 | } | 102 | } |
98 | 103 | ||
99 | static void render_texture(struct wlr_output *wlr_output, | 104 | static void render_texture(struct wlr_output *wlr_output, |