From d89c365106b8d58e4a37ad58e9987a7da28c8951 Mon Sep 17 00:00:00 2001 From: Erik Reider <35975961+ErikReider@users.noreply.github.com> Date: Thu, 21 Sep 2023 03:35:49 +0200 Subject: Add layer effect option to ignore transparent regions when blurring (#159) --- include/sway/desktop/fx_renderer/fx_renderer.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include/sway/desktop/fx_renderer/fx_renderer.h') diff --git a/include/sway/desktop/fx_renderer/fx_renderer.h b/include/sway/desktop/fx_renderer/fx_renderer.h index 67dc6adf..410e3d94 100644 --- a/include/sway/desktop/fx_renderer/fx_renderer.h +++ b/include/sway/desktop/fx_renderer/fx_renderer.h @@ -32,6 +32,7 @@ struct decoration_data { float dim; float *dim_color; bool has_titlebar; + bool discard_transparent; bool blur; bool shadow; }; @@ -113,6 +114,7 @@ struct tex_shader { GLint dim; GLint dim_color; GLint has_titlebar; + GLint discard_transparent; }; struct fx_renderer { @@ -177,6 +179,15 @@ void fx_renderer_clear(const float color[static 4]); void fx_renderer_scissor(struct wlr_box *box); +// Initialize the stenciling work +void fx_renderer_stencil_mask_init(); + +// Close the mask +void fx_renderer_stencil_mask_close(bool draw_inside_mask); + +// Finish stenciling and clear the buffer +void fx_renderer_stencil_mask_fini(); + bool fx_render_subtexture_with_matrix(struct fx_renderer *renderer, struct fx_texture *fx_texture, const struct wlr_fbox *src_box, const struct wlr_box *dst_box, const float matrix[static 9], struct decoration_data deco_data); -- cgit v1.2.3