Commit 28b08ae6 authored by Jeremy White's avatar Jeremy White Committed by Frediano Ziglio

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 97517317
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's avatarFrediano Ziglio <>
parent 21cbdc8a
......@@ -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;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment