| Commit message (Collapse) | Author | Age |
| |
|
|
| |
Clippy suggests using the function provided in std.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Suggested by clippy.
|
| |
|
|
|
| |
This fixes a bug that crashes the terminal when a graphic is added before
resizing the window.
|
| |
|
|
|
| |
- Reimplement abs_diff().
- Use positional arguments to format the error message in assert_color!().
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
A simple optimization for inserting graphics is to detect when a new graphic is
replacing completely an existing one. If both graphics have the same size, and
the new one is opaque, we can assume that the previous graphic will not be
displayed anymore, so it is not considered when update the graphics list in a
single cell.
This commit also adds serde implementation for GraphicsCell. This was used to
debug the new logic.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
If a graphic is added over another one, the implementation now checks if new
graphic has transparent pixels in every cell. If so, the graphic is appended to
the cell, instead of replacing the previous one.
SmallVec is used to prevent heap allocation when the cell only contains a single
graphic. This should be the most common scenario.
The GPU will store up to 100 textures. If another texture is added when there
are 100, the oldest one is deleted.
|
| |
|
|
|
|
|
|
|
| |
When text is added to a cell with a reference to a graphic, an operation is sent
to the OpenGL thread to replace a subregion of the cell with a transparent area.
If the OpenGL driver supports the GL_ARB_clear_texture extension, the region is
updated with glClearTexSubImage. If the extension is not available, the
texture is updated with glTexSubImage2D.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The merge requires multiple changes in order to be compatible with the last
version of Alacritty:
- Textures are now always deleted on Drop.
This is required because Alacritty now supports multiple windows in the same
process, so we can't assume that all resources are freed when a single window
is closed. This is the same approach used for the atlas textures.
- The graphics feature is only compatible with OpenGL 3.3.
Alacritty now supports GLES 2.2, but in order to provide a proper support for
it we need a different approach, specific for that version.
- Cell dimensions in pixels are re-added to the alacritty_terminal crate.
|
| | |
|
| | |
|
|
|
Fixes #910
|