<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/sixel.c, branch 1.5.3</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.5.3</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.5.3'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2020-10-11T17:26:09Z</updated>
<entry>
<title>sixel: reflow: drop sixels that crosses the scrollback history’s end</title>
<updated>2020-10-11T17:26:09Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-10-05T16:33:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=d0c5cf6e9fa3c7f85531cfc3d3166c2cf7b6707e'/>
<id>urn:sha1:d0c5cf6e9fa3c7f85531cfc3d3166c2cf7b6707e</id>
<content type='text'>
This fixes various crashes that occurred after a reflow due to the
sixel image list invariants no longer being true.
</content>
</entry>
<entry>
<title>sixel: unhook: do overwrite *after* linefeeding</title>
<updated>2020-10-11T17:26:07Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-10-05T16:32:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=d54adc526334483ebe87b6f46589229d97f3ce5f'/>
<id>urn:sha1:d54adc526334483ebe87b6f46589229d97f3ce5f</id>
<content type='text'>
This ensures the overwrite is done when the scrollback history is in
the same state as when we then insert the new image.
</content>
</entry>
<entry>
<title>sixel: overwrite: use pixman to calculate new the sixel boundaries</title>
<updated>2020-10-11T17:26:05Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-10-05T16:31:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=0e4b0fefc1bef0616eeb290dfb392065a5ea31d2'/>
<id>urn:sha1:0e4b0fefc1bef0616eeb290dfb392065a5ea31d2</id>
<content type='text'>
When punching a hole in a sixel (and thus splitting it up into up to
four new sixels), use pixman to calculate the new sixel coordinates
and sizes.
</content>
</entry>
<entry>
<title>sixel: ovewrite-by-rectangle: in debug builds, cross-reference against pixman</title>
<updated>2020-10-11T17:26:03Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-10-05T16:30:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=329a290f82c867859222862c77a44fff08c651e6'/>
<id>urn:sha1:329a290f82c867859222862c77a44fff08c651e6</id>
<content type='text'>
Use pixman to calculate the intersection of the rectangle being
overwritten, and the sixel(s). Verify our code matches.
</content>
</entry>
<entry>
<title>sixel: verify scrollback consistency: new verify function</title>
<updated>2020-10-11T17:26:01Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-10-05T16:29:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=09e8a5b11d044ed6c6c133e25a99fe86c2f76f39'/>
<id>urn:sha1:09e8a5b11d044ed6c6c133e25a99fe86c2f76f39</id>
<content type='text'>
Verifies sixels have been scrolled out correctly
</content>
</entry>
<entry>
<title>sixel: add comments to verify_*() functions</title>
<updated>2020-10-11T17:26:00Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-10-05T16:28:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=cc54c1bea7737c7456cef87d9fe05aafbb5fe057'/>
<id>urn:sha1:cc54c1bea7737c7456cef87d9fe05aafbb5fe057</id>
<content type='text'>
</content>
</entry>
<entry>
<title>sixel: verify-*: don’t return anything; rely on asserts only</title>
<updated>2020-10-11T17:25:58Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-10-04T17:29:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=0a802c2693672d84478a3fc22313552ee56a7822'/>
<id>urn:sha1:0a802c2693672d84478a3fc22313552ee56a7822</id>
<content type='text'>
</content>
</entry>
<entry>
<title>sixel: scroll up/down: early return when list is empty</title>
<updated>2020-10-11T17:25:56Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-10-04T17:28:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=eec097173979d198042447739a687891ebae1ac6'/>
<id>urn:sha1:eec097173979d198042447739a687891ebae1ac6</id>
<content type='text'>
Branch tagged as ‘likely’ for performance reason
</content>
</entry>
<entry>
<title>sixel: cell-size-changed: don’t verify sixels here</title>
<updated>2020-10-11T17:25:55Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-10-04T17:22:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=3540031dc66f4b55941c6c2fbe476042bc3bcebf'/>
<id>urn:sha1:3540031dc66f4b55941c6c2fbe476042bc3bcebf</id>
<content type='text'>
The state after this function is an intermediate state and isn’t
necessarily valid.

This sixels needs to be ‘reflowed’ to ensure a valid state. This is
something that should be done by the caller after the text grid has
been reflowed and the sixel coordinates have been re-mapped to the new
grid.

TODO: can/should we update the sixel cols/rows in sixel_reflow()
instead?
</content>
</entry>
<entry>
<title>sixel: unhook: look total number of sixels</title>
<updated>2020-10-11T17:25:53Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-10-04T17:17:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=f834ae8addef13cd0faecd66b519aa1267094026'/>
<id>urn:sha1:f834ae8addef13cd0faecd66b519aa1267094026</id>
<content type='text'>
This helps debug sixel overwrites, as it makes it more visible when
there are sixels that _should_ have been removed.
</content>
</entry>
<entry>
<title>sixel: scroll-up: don’t break out early of loop</title>
<updated>2020-10-11T17:25:51Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-10-04T17:11:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=47c884da536bc03e18521a95f9f164dce927f147'/>
<id>urn:sha1:47c884da536bc03e18521a95f9f164dce927f147</id>
<content type='text'>
This function loops the list of sixels, and discards those that would
be scrolled out if the grid offset is moved forward by the specified
number of rows.

The criteria is when the rebased row value is less than the number of
rows to scroll.

A rebased row number is a zero-based number starting at the beginning
of the scrollback. Thus, when scrolling 5 rows, rows with a rebased
row number between 0-4 will be scrolled out.

For performance reasons, we used to break out of the loop as soon as a
row number *larger* than the scroll count.

This however does not work. The sixels are sorted by their *end*
row. While this works in most cases (think images outputted in the
shell in the normal screen), it doesn’t always.

In the alt screen, where applications can print images just about
anywhere, it is possible to have *any* start row number anywhere in
the sixel list. Just as long as their *end* row numbers are sorted.

For example, a huuuge sixel that covers the entire scrollback. This
sixel will naturally be first in the list (and thus sixel_scroll_up()
will visit it *last*, since it iterates the list in reverse), but
should still be destroyed when scrolling.
</content>
</entry>
<entry>
<title>sixel: verify-list-order: add an ‘index’ variable</title>
<updated>2020-10-11T17:25:50Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-10-04T17:10:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5a2cc9c9ae744e8b5026e02dfc4c568c4e7ad95c'/>
<id>urn:sha1:5a2cc9c9ae744e8b5026e02dfc4c568c4e7ad95c</id>
<content type='text'>
This will make it easier when debugging assertions in this function.
</content>
</entry>
<entry>
<title>sixel: overwrite-by-rectangle: assert sixels don’t cross scrollback wrap-around</title>
<updated>2020-10-11T17:25:48Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-10-04T12:05:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=96a20c9df7f7a3d10ad3ce1e215e049857835536'/>
<id>urn:sha1:96a20c9df7f7a3d10ad3ce1e215e049857835536</id>
<content type='text'>
</content>
</entry>
<entry>
<title>sixel: scroll: call sixel_erase() instead of sixel_destroy()</title>
<updated>2020-10-11T17:25:46Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-10-04T12:03:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=6a8130c12278d9f24791bc3508e96fcd33e1490f'/>
<id>urn:sha1:6a8130c12278d9f24791bc3508e96fcd33e1490f</id>
<content type='text'>
This ensures the screen is updated correctly. Without this, the sixel
image would remain on screen until force-refreshed by some other means.
</content>
</entry>
<entry>
<title>sixel: TOOD -&gt; TODO (fixes codespell build error)</title>
<updated>2020-10-11T17:25:44Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-10-04T11:33:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=74703822fb59f9c5ffd3684b16f3df3f6681a7e4'/>
<id>urn:sha1:74703822fb59f9c5ffd3684b16f3df3f6681a7e4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>sixel: verify-no-overlap: free pixman regions</title>
<updated>2020-10-11T17:25:43Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-10-04T11:32:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=29d00684627640e4fa908964a2ea04af0707bc58'/>
<id>urn:sha1:29d00684627640e4fa908964a2ea04af0707bc58</id>
<content type='text'>
</content>
</entry>
<entry>
<title>sixel: verify-no-overlap: initialize ‘intersection’ pixman region</title>
<updated>2020-10-11T17:25:41Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-10-04T11:32:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=e8f703eb6544867c191ce3e9b2277c12599fab57'/>
<id>urn:sha1:e8f703eb6544867c191ce3e9b2277c12599fab57</id>
<content type='text'>
</content>
</entry>
<entry>
<title>sixel: unhook: only call render_refresh() once</title>
<updated>2020-10-11T17:25:38Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-10-04T11:13:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=af7fd00909c7da55b966b90293b6551a308bf725'/>
<id>urn:sha1:af7fd00909c7da55b966b90293b6551a308bf725</id>
<content type='text'>
</content>
</entry>
<entry>
<title>sixel: implement reflow</title>
<updated>2020-10-11T17:25:36Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-10-04T11:12:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=2e7afc615c4b3a32a383da2efad8e30dc3fd9eac'/>
<id>urn:sha1:2e7afc615c4b3a32a383da2efad8e30dc3fd9eac</id>
<content type='text'>
Move sixel reflow from grid_reflow() to sixel_reflow(). This lets us
use internal sixel functions to update the sixels.

Note that grid_reflow() still needs to remap the sixelss coordinates.
</content>
</entry>
<entry>
<title>sixel: verify-sixels: check for bad list order last</title>
<updated>2020-10-11T17:25:32Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-10-04T11:10:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=da866f6453861dda3cc517be034fe688adafeb74'/>
<id>urn:sha1:da866f6453861dda3cc517be034fe688adafeb74</id>
<content type='text'>
</content>
</entry>
</feed>
