Commit graph

27 commits

Author SHA1 Message Date
Matsumoto Kotaro
89946ebc07 graphics: make N a transient usage-hints bitmask
Change the graphics protocol N key from a boolean into a usage-hints
bitmask. Define the first bit as a transient hint, allowing the terminal
to treat the image data as short-lived and apply optimizations such as
skipping disk cache writes.

Propagate the transient hint through frame coalescing and composition, so
a composed frame is transient if any contributing frame is transient.
2026-06-19 13:22:01 +09:00
Matsumoto Kotaro
cc2d7a1789 graphics: add memory-only storage for graphics data
Add a new graphics protocol key, N=1, to request that transmitted
image/frame data is kept only in memory and not written to the graphics
disk cache file.

This is useful for transient high-frequency updates such as video-like
streams, where the latest frame is the only useful data and persisting
each frame to the disk cache causes unnecessary write traffic.

The implementation keeps the existing graphics cache abstraction intact:
memory-only entries can still be read back by animation, composition, and
frame coalescing paths. Only persistence to the disk cache file is skipped.

The default behavior is unchanged when N is omitted or set to zero.
2026-05-30 18:46:24 +09:00
Kovid Goyal
744ad7438c
Use SIMD base64 encoding for graphics transmission 2026-04-21 10:01:28 +05:30
Kovid Goyal
c861259e3b
Rename go module from kitty -> github.com/kovidgoyal/kitty
Makes the code more easily re-useable in other projects
2025-05-16 08:43:39 +05:30
Kovid Goyal
c19488f3be
Graphics protocol: Add a new delete mode for deleting images whose ids fall within a range
Useful for bulk deletion. See #7080
2024-02-25 09:57:44 +05:30
Kovid Goyal
93430cd5f4
Images benchmark should not measure speed of zlib 2024-02-25 09:57:29 +05:30
Kovid Goyal
47a493c090
Increase chunk size for graphics protocol since the VT parser now supports it 2024-02-25 09:57:25 +05:30
Kovid Goyal
38be3e98a1
More linter fixes 2023-09-24 09:16:27 +05:30
Kovid Goyal
54a1cfc380
Autogen enum <-> string boilerplate for Go 2023-05-28 11:48:32 +05:30
Kovid Goyal
d66da811db
More work on getting images to display in diff 2023-03-27 07:53:57 +05:30
Kovid Goyal
508a61bd1c
More work on diffing images 2023-03-27 07:53:57 +05:30
Kovid Goyal
defac0c061
Implement automatic tmux passthrough for icat 2023-03-04 13:01:23 +05:30
Kovid Goyal
1218a152bf
Implement unicode placeholders in icat 2023-03-04 11:54:22 +05:30
Kovid Goyal
5eaa935ede
icat: Dont try to further compress PNG images when using stream based transmission 2023-02-01 11:45:01 +05:30
Kovid Goyal
092dc3d01f
... 2023-02-01 11:28:52 +05:30
Kovid Goyal
5c0d477a18
icat kitten: Fix transmission of frame data in direct mode
Sometimes frame data is > 2048 but does not compress smaller, which
broke the if statement checking for first loop.

Fixes #5958
2023-02-01 10:51:59 +05:30
Kovid Goyal
c317c934f3
More work on ImageMagick 2023-01-05 19:15:13 +05:30
Kovid Goyal
24db38ba7e
Set data size for SHM transmission as on some platforms the actual SHM size is not equal to the requested size 2023-01-05 19:15:11 +05:30
Kovid Goyal
d694f48c91
Get the other two transmission modes working as well 2023-01-05 19:15:11 +05:30
Kovid Goyal
5562a4d52f
Get file mode transmission working for unmodified PNG 2023-01-05 19:15:11 +05:30
Kovid Goyal
7a1140cd03
Start work on porting icat to Go 2023-01-05 19:15:10 +05:30
Kovid Goyal
40093a4702
Add tests for GraphicsCommand serialization 2022-12-18 11:56:30 +05:30
Kovid Goyal
3815cba8f3
Add stringer interface to GraphicsCommand 2022-12-17 15:34:43 +05:30
Kovid Goyal
7410cd62f9
remove unused code 2022-12-17 09:00:44 +05:30
Kovid Goyal
ae0a8e73d2
... 2022-12-17 08:59:56 +05:30
Kovid Goyal
8f3a8c828f
Add an APC to GraphicsCommand parser 2022-12-16 21:05:17 +05:30
Kovid Goyal
bb33f6c0ac
Start work on graphics support in kitty-tool 2022-12-16 18:06:52 +05:30