summaryrefslogtreecommitdiff
path: root/sway/config.c
diff options
context:
space:
mode:
authorWilliam McKinnon <[email protected]>2023-05-16 02:26:01 -0400
committerGitHub <[email protected]>2023-05-16 02:26:01 -0400
commit2c4fe20456851b6b8dc14b6bdc0cf9bee527a9ee (patch)
treec9e8a650da8a23c849516a6ac54dd59527681693 /sway/config.c
parent479cc4e7456a93aed1a89bef8d83c1f8c43bd291 (diff)
Blur damage tracking simplification (#155)
* suplified conditional in find_con_effect_iterator * removed has_blur * simplified optimized blur check * moved damage expansion to output.c * removed extraneous fx_renderer_scissor * cleaned up render_output * removed unneeded damage scale * moved workspace optimized check function to workspace.c * renamed ws iterator function * added back region expansion * removed uneeded parameter from get_main_buffer_blur * returned extended damage * moved get_blur_size back to original spot (reduce diff size) * Fixed blur artifacting * Fixed damage highlight not clearing correct framebuffer * removed unneeded conditional * moved initial damage expansion to output.c * moved extended damage to the top of output_render * moved blur damage to damage_surface_iterator * ensure damage doesnt expand beyond output size * removed stdint import --------- Co-authored-by: Erik Reider <[email protected]>
Diffstat (limited to 'sway/config.c')
-rw-r--r--sway/config.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sway/config.c b/sway/config.c
index 85e53679..04c75171 100644
--- a/sway/config.c
+++ b/sway/config.c
@@ -1084,3 +1084,11 @@ void translate_keysyms(struct input_config *input_config) {
sway_log(SWAY_DEBUG, "Translated keysyms using config for device '%s'",
input_config->identifier);
}
+
+int config_get_blur_size() {
+ return pow(2, config->blur_params.num_passes) * config->blur_params.radius;
+}
+
+bool config_should_parameters_blur() {
+ return config->blur_params.radius > 0 && config->blur_params.num_passes > 0;
+}