diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-08-19 11:29:59 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-08-19 16:17:24 +1000 |
commit | f9563d88f30fd70c5999520fa7f4b3d0dffd1a4c (patch) | |
tree | e042ef90214040470a7a3e6371a23d97032786c6 /sway/desktop/render.c | |
parent | Standardise debug variables (diff) | |
download | sway-f9563d88f30fd70c5999520fa7f4b3d0dffd1a4c.tar.gz sway-f9563d88f30fd70c5999520fa7f4b3d0dffd1a4c.tar.zst sway-f9563d88f30fd70c5999520fa7f4b3d0dffd1a4c.zip |
Use enum for damage debug options
Diffstat (limited to 'sway/desktop/render.c')
-rw-r--r-- | sway/desktop/render.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sway/desktop/render.c b/sway/desktop/render.c index 8fc642a6..f6afb82b 100644 --- a/sway/desktop/render.c +++ b/sway/desktop/render.c | |||
@@ -834,9 +834,9 @@ void output_render(struct sway_output *output, struct timespec *when, | |||
834 | goto renderer_end; | 834 | goto renderer_end; |
835 | } | 835 | } |
836 | 836 | ||
837 | if (debug.highlight_damage) { | 837 | if (debug.damage == DAMAGE_HIGHLIGHT) { |
838 | wlr_renderer_clear(renderer, (float[]){1, 1, 0, 1}); | 838 | wlr_renderer_clear(renderer, (float[]){1, 1, 0, 1}); |
839 | } else if (debug.nodamage) { | 839 | } else if (debug.damage == DAMAGE_RERENDER) { |
840 | int width, height; | 840 | int width, height; |
841 | wlr_output_transformed_resolution(wlr_output, &width, &height); | 841 | wlr_output_transformed_resolution(wlr_output, &width, &height); |
842 | pixman_region32_union_rect(damage, damage, 0, 0, width, height); | 842 | pixman_region32_union_rect(damage, damage, 0, 0, width, height); |
@@ -918,7 +918,7 @@ renderer_end: | |||
918 | wlr_render_texture(renderer, root_container.sway_root->debug_tree, | 918 | wlr_render_texture(renderer, root_container.sway_root->debug_tree, |
919 | wlr_output->transform_matrix, 0, 40, 1); | 919 | wlr_output->transform_matrix, 0, 40, 1); |
920 | } | 920 | } |
921 | if (debug.highlight_damage) { | 921 | if (debug.damage == DAMAGE_HIGHLIGHT) { |
922 | int width, height; | 922 | int width, height; |
923 | wlr_output_transformed_resolution(wlr_output, &width, &height); | 923 | wlr_output_transformed_resolution(wlr_output, &width, &height); |
924 | pixman_region32_union_rect(damage, damage, 0, 0, width, height); | 924 | pixman_region32_union_rect(damage, damage, 0, 0, width, height); |