aboutsummaryrefslogtreecommitdiff
path: root/terminal.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-03-06 21:05:40 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-03-11 16:32:57 +0000
commit8c65c68b734b3a0711e8d0a7282d6c7d9def5ddf (patch)
treeeedb13a43a94508ea721cb669ad72cb33b401f40 /terminal.h
parentsixel: add: resize is already checking against the current max geometry (diff)
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.
Diffstat (limited to 'terminal.h')
-rw-r--r--terminal.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/terminal.h b/terminal.h
index e4e662fb..2a8bb6f9 100644
--- a/terminal.h
+++ b/terminal.h
@@ -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 */