summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorErik Reider <[email protected]>2023-09-21 03:35:49 +0200
committerGitHub <[email protected]>2023-09-20 21:35:49 -0400
commitd89c365106b8d58e4a37ad58e9987a7da28c8951 (patch)
treee51fb83ee93d7544e23dbe65edb19c163894c30a /include
parent6f6991a1b38b03e87fd3f73607ca2393ae62cfea (diff)
Add layer effect option to ignore transparent regions when blurring (#159)
Diffstat (limited to 'include')
-rw-r--r--include/sway/desktop/fx_renderer/fx_renderer.h11
-rw-r--r--include/sway/layers.h1
2 files changed, 12 insertions, 0 deletions
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);
diff --git a/include/sway/layers.h b/include/sway/layers.h
index b04990dc..5871f0d8 100644
--- a/include/sway/layers.h
+++ b/include/sway/layers.h
@@ -30,6 +30,7 @@ struct sway_layer_surface {
bool has_shadow;
bool has_blur;
+ bool blur_ignore_transparent;
int corner_radius;
};