diff options
author | Simon Ser <contact@emersion.fr> | 2023-03-06 16:57:27 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2023-04-14 17:43:37 +0200 |
commit | ab4f46059793cbdd7942b128db970de95af37ed3 (patch) | |
tree | 9a7061a5b2e784a2916053c8e8ba76a8a5c47fe3 | |
parent | Skip direct scan-out commit when damage is empty (diff) | |
download | sway-ab4f46059793cbdd7942b128db970de95af37ed3.tar.gz sway-ab4f46059793cbdd7942b128db970de95af37ed3.tar.zst sway-ab4f46059793cbdd7942b128db970de95af37ed3.zip |
Set output damage during direct scan-out
During direct scan-out, pass the damaged region to the wlroots
backend.
-rw-r--r-- | sway/desktop/output.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 91a5936a..17bce123 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c | |||
@@ -571,6 +571,11 @@ static int output_repaint_timer_handler(void *data) { | |||
571 | fullscreen_con = workspace->current.fullscreen; | 571 | fullscreen_con = workspace->current.fullscreen; |
572 | } | 572 | } |
573 | 573 | ||
574 | pixman_region32_t frame_damage; | ||
575 | get_frame_damage(output, &frame_damage); | ||
576 | wlr_output_set_damage(wlr_output, &frame_damage); | ||
577 | pixman_region32_fini(&frame_damage); | ||
578 | |||
574 | if (fullscreen_con && fullscreen_con->view && !debug.noscanout) { | 579 | if (fullscreen_con && fullscreen_con->view && !debug.noscanout) { |
575 | // Try to scan-out the fullscreen view | 580 | // Try to scan-out the fullscreen view |
576 | static bool last_scanned_out = false; | 581 | static bool last_scanned_out = false; |
@@ -609,11 +614,6 @@ static int output_repaint_timer_handler(void *data) { | |||
609 | 614 | ||
610 | pixman_region32_fini(&damage); | 615 | pixman_region32_fini(&damage); |
611 | 616 | ||
612 | pixman_region32_t frame_damage; | ||
613 | get_frame_damage(output, &frame_damage); | ||
614 | wlr_output_set_damage(wlr_output, &frame_damage); | ||
615 | pixman_region32_fini(&frame_damage); | ||
616 | |||
617 | if (!wlr_output_commit(wlr_output)) { | 617 | if (!wlr_output_commit(wlr_output)) { |
618 | return 0; | 618 | return 0; |
619 | } | 619 | } |