Merge image_merge into 4902-image-support

Replace SIXEL retention and the per-client cache with the global indexed-image cache from image_merge. Adapt its backend callbacks for Kitty and test palette quantization through both input protocols.
This commit is contained in:
Nicholas Marriott
2026-10-14 15:39:59 +01:00
8 changed files with 364 additions and 554 deletions

View File

@@ -132,8 +132,6 @@ void image_size_in_cells(u_int, u_int, u_int, u_int, u_int *,
u_int *);
void image_set_no_cursor(struct image *);
int image_has_no_cursor(struct image *);
struct sixel_image *image_get_sixel(struct image *);
void image_set_sixel(struct image *, struct sixel_image *);
u_int image_get_source_id(struct image *);
u_int image_get_order_id(struct image *);
void image_set_order_id(struct image *, u_int);
@@ -222,17 +220,13 @@ void kitty_free_output_state(struct tty *, int);
#define SIXEL_COLOUR_REGISTERS 1024
int sixel_select(struct tty *);
int sixel_get_flags(struct tty *);
struct sixel_image *sixel_parse(const char *, size_t, u_int, u_int, u_int,
u_int);
struct sixel_image *sixel_parse(const char *, size_t, u_int, u_int, u_int);
void sixel_write(struct screen_write_ctx *, struct sixel_image *,
u_int);
void sixel_draw_rect(struct tty *, const struct image_rect *);
void sixel_redraw_start(struct tty *, u_int, u_int, u_int, u_int);
void sixel_free_output(struct tty *, int);
void sixel_flush_output(struct tty *);
struct image *sixel_to_image(struct sixel_image *);
void sixel_free(struct sixel_image *);
void sixel_log(struct sixel_image *);
void sixel_start_draw(struct tty *, u_int, u_int, u_int, u_int);
void sixel_free_pending(struct tty *, int);
void sixel_flush_pending(struct tty *);
#endif /* ENABLE_IMAGES */