aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Kirill Primak <vyivel@posteo.net>2021-09-07 15:47:27 +0300
committerLibravatar Simon Ser <contact@emersion.fr>2021-09-07 14:52:29 +0200
commit91d6d00414c2d4dbf24519b54002b84191294e8d (patch)
tree51601278bc0c7c2fc1339f32f0b29be74ff5ace0
parentsurface: chase wlr subsurface list/link change (diff)
downloadsway-91d6d00414c2d4dbf24519b54002b84191294e8d.tar.gz
sway-91d6d00414c2d4dbf24519b54002b84191294e8d.tar.zst
sway-91d6d00414c2d4dbf24519b54002b84191294e8d.zip
render: fix -Ddamage=rerender
-rw-r--r--sway/desktop/render.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/sway/desktop/render.c b/sway/desktop/render.c
index d25df570..17fc8f6f 100644
--- a/sway/desktop/render.c
+++ b/sway/desktop/render.c
@@ -1033,6 +1033,12 @@ void output_render(struct sway_output *output, struct timespec *when,
1033 1033
1034 wlr_renderer_begin(renderer, wlr_output->width, wlr_output->height); 1034 wlr_renderer_begin(renderer, wlr_output->width, wlr_output->height);
1035 1035
1036 if (debug.damage == DAMAGE_RERENDER) {
1037 int width, height;
1038 wlr_output_transformed_resolution(wlr_output, &width, &height);
1039 pixman_region32_union_rect(damage, damage, 0, 0, width, height);
1040 }
1041
1036 if (!pixman_region32_not_empty(damage)) { 1042 if (!pixman_region32_not_empty(damage)) {
1037 // Output isn't damaged but needs buffer swap 1043 // Output isn't damaged but needs buffer swap
1038 goto renderer_end; 1044 goto renderer_end;
@@ -1040,10 +1046,6 @@ void output_render(struct sway_output *output, struct timespec *when,
1040 1046
1041 if (debug.damage == DAMAGE_HIGHLIGHT) { 1047 if (debug.damage == DAMAGE_HIGHLIGHT) {
1042 wlr_renderer_clear(renderer, (float[]){1, 1, 0, 1}); 1048 wlr_renderer_clear(renderer, (float[]){1, 1, 0, 1});
1043 } else if (debug.damage == DAMAGE_RERENDER) {
1044 int width, height;
1045 wlr_output_transformed_resolution(wlr_output, &width, &height);
1046 pixman_region32_union_rect(damage, damage, 0, 0, width, height);
1047 } 1049 }
1048 1050
1049 if (output_has_opaque_overlay_layer_surface(output)) { 1051 if (output_has_opaque_overlay_layer_surface(output)) {
@@ -1144,7 +1146,7 @@ renderer_end:
1144 wlr_region_transform(&frame_damage, &output->damage->current, 1146 wlr_region_transform(&frame_damage, &output->damage->current,
1145 transform, width, height); 1147 transform, width, height);
1146 1148
1147 if (debug.damage == DAMAGE_HIGHLIGHT) { 1149 if (debug.damage != DAMAGE_DEFAULT) {
1148 pixman_region32_union_rect(&frame_damage, &frame_damage, 1150 pixman_region32_union_rect(&frame_damage, &frame_damage,
1149 0, 0, wlr_output->width, wlr_output->height); 1151 0, 0, wlr_output->width, wlr_output->height);
1150 } 1152 }