mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-26 07:57:59 -04:00
sixel: get rid of an ‘imul’ in sixel_add()
By storing the current row’s byte offset into the backing image in the terminal struct. This replaces the ‘imul’ with a load, which can potentially be slow. But, this data should already be in the cache.
This commit is contained in:
parent
dfdb42138d
commit
8c65c68b73
2 changed files with 5 additions and 2 deletions
|
|
@ -521,6 +521,7 @@ struct terminal {
|
|||
} state;
|
||||
|
||||
struct coord pos; /* Current sixel coordinate */
|
||||
size_t row_byte_ofs; /* Byte position into image, for current row */
|
||||
int color_idx; /* Current palette index */
|
||||
int max_col; /* Largest column index we've seen (aka the image width) */
|
||||
uint32_t *private_palette; /* Private palette, used when private mode 1070 is enabled */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue