From 6ca742d4f2408e2277b98825206ed9d7e6cf41b1 Mon Sep 17 00:00:00 2001 From: Will McKinnon Date: Fri, 11 Nov 2022 20:05:05 -0500 Subject: feat: render tiling move indicator with round corners --- include/sway/desktop/fx_renderer.h | 3 ++- include/sway/output.h | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/sway/desktop/fx_renderer.h b/include/sway/desktop/fx_renderer.h index 0bbfcec3..b461ba02 100644 --- a/include/sway/desktop/fx_renderer.h +++ b/include/sway/desktop/fx_renderer.h @@ -4,7 +4,7 @@ #include #include -enum corner_location { NONE, TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT }; +enum corner_location { ALL, TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT }; struct gles2_tex_shader { GLuint program; @@ -44,6 +44,7 @@ struct fx_renderer { GLint pos_attrib; } quad; + struct rounded_quad_shader rounded_quad; struct rounded_quad_shader rounded_tl_quad; struct rounded_quad_shader rounded_tr_quad; diff --git a/include/sway/output.h b/include/sway/output.h index 26b9709f..dc34686a 100644 --- a/include/sway/output.h +++ b/include/sway/output.h @@ -5,6 +5,7 @@ #include #include #include "config.h" +#include "sway/desktop/fx_renderer.h" #include "sway/tree/node.h" #include "sway/tree/view.h" @@ -162,6 +163,12 @@ void render_rect(struct sway_output *output, pixman_region32_t *output_damage, const struct wlr_box *_box, float color[static 4]); +void render_rounded_rect(struct sway_output *output, + pixman_region32_t *output_damage, const struct wlr_box *_box, + float color[static 4], int corner_radius, + enum corner_location corner_location); + + void premultiply_alpha(float color[4], float opacity); void scale_box(struct wlr_box *box, float scale); -- cgit v1.2.3