1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-23 06:54:45 +03:00
wezterm/window
Wez Furlong 52908712c6 wezterm: add excess padding for image protocols
When allocating space in the texture atlas, we typically use
a small padding to avoid accidentally interpolating textures
into glyphs.

When it comes to rendering images via iterm2 or sixel image
protocols, the image emitted by the user may not exactly fill
the cell dimensions, and due to the how the shader works to
apply those textures we could end up revealing nearby images
in the texture when displaying an unrelated image.

This commit adjusts the texture atlas allocation when making
space for image protocol textures; excess padding based on
an overestimate of the cell dimensions is added to the right
and bottom of the image, guaranteeing that that border will
be filled with transparent pixels.

This is a bit wasteful of texture space, but isn't egregiously
bad and is easy to reason about and makes things look less
janky.

refs: #292
2020-10-24 12:46:49 -07:00
..
examples upgrade misc deps, notably, async-task 2020-10-05 00:06:01 -07:00
src wezterm: add excess padding for image protocols 2020-10-24 12:46:49 -07:00
build.rs window: handle opengl context loss on windows. 2020-06-16 21:17:48 -07:00
Cargo.toml wezterm: improve texture atlas allocation 2020-10-23 13:57:58 -07:00