render: run the “overflowing glyphs” prepass *before* rendering sixels

This fixes an issue where the left-most column of a sixel was
“overwritten” by the cell content.

This patch also rewrites the prepass logic, to try to reduce the
number of loads performed.

The new logic loops each row from left to right, looking for dirty
cells. When a dirty cell is found, we first scan backwards, until we
find a non-overflowing cell. That cell is unaffected by the
overflowing cell we’re currently dealing with.

We can also stop as soon as we see a dirty cell, since that cell will
already have been dealt with.

Then, we scan forward, dirtying cells until we see a non-overflowing
cell. That first non-overflowing cell is also dirtied, but after that
we break.

The last loop, that scans forward, advances the same cell pointer used
in the outer loop.
This commit is contained in:
Daniel Eklöf 2021-08-10 18:33:18 +02:00
parent 2b14e28512
commit 41a8f2fc65
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 70 additions and 18 deletions

View file

@ -74,6 +74,8 @@
scaling factor.
* Slow-to-terminate client applications causing other footclient instances to
freeze when closing a footclient window.
* Underlying cell content showing through in the left-most column of
sixels.
### Security