summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy White <jwhite@codeweavers.com>2020-05-11 11:59:01 -0500
committerFrediano Ziglio <freddy77@gmail.com>2020-05-13 18:52:19 +0100
commit28b08ae63cfe79da8b31c3a50238ac5a3547370a (patch)
tree1a875cbe35df1d2dd6564b23ea0a00fbee3f1904
parent21cbdc8ae418212b6f24fc08db09f1b5c1dc1498 (diff)
Fix a bug introduced by the full-screen scan.
You will get occasional screen glitches; you could observe this doing an 'ls; clear' pattern again and again. This was caused by the full screen optimization made in 97517317bdc3 which can cause some scan reports to be incorrectly discarded. Full disclosure: I modified Brendan's original patch to introduce this bug, so the blame is mine alone. Acked-by: Frediano Ziglio <fziglio@redhat.com>
-rw-r--r--src/display.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/display.c b/src/display.c
index e6755e6..db2033e 100644
--- a/src/display.c
+++ b/src/display.c
@@ -665,9 +665,18 @@ int display_scan_whole_screen(display_t *d, int num_vertical_tiles, int num_hori
}
}
- /* We've just read the full screen; may as well use it */
- destroy_shm_image(d, d->fullscreen);
- d->fullscreen = fullscreen_new;
+ /* Note: it is tempting to replace d->fullscreen now, but that causes
+ display glitches. The issue is the optimization in scanner_push.
+ That will cause us to discard a SCANLINE_SCAN_REPORT if there
+ is a whole screen SCANLINE_DAMAGE_REPORT right behind it. That logic is
+ reasonable, if the scan will continue to find a problem. But replacing
+ d->fullscreen now will cause that damage report to fail to find any
+ problems, and we'll have discarded a valid scan report.
+ You can modify scan.c to drop that optimization for DAMAGE reports,
+ but a naive perf analysis suggests that actually costs you.
+ This is partly because call to display_copy_image_into_fullscreen
+ in handle_scan_report() still occurs, so you haven't saved that time. */
+ destroy_shm_image(d, fullscreen_new);
return ret;
}