Commit Graph

25 Commits

Author SHA1 Message Date
ii41 a754d06b44
Add support for single line terminals
This changes the minimum terminal dimensions from 2 lines and 2 columns,
to 1 line and 2 columns.

This also reworks the `SizeInfo` to store the number of columns and
lines and consistently has only the terminal lines/columns stored,
instead of including the message bar and search in some places of the
Alacritty renderer/input.

These new changes also make it easy to properly start the selection
scrolling as soon as the mouse is over the message bar, instead of
waiting until it is beyond it.

Fixes #4207.

Co-authored-by: Christian Duerr <contact@christianduerr.com>
2020-09-27 22:36:08 +00:00
Kirill Chibisov 62c300c14c
Log new padding and cell size on 'SizeInfo' update
This makes our logging of 'SizeInfo' changes more consistent
with the one we're using when creating a new 'Display'.
2020-09-24 03:08:26 +03:00
Joe Wilm 99c34c7ce9
Reduce InstanceData footprint
The InstanceData type in the rendering subsystem was previously 17 f32s
plus one u8 which occupied a total of 72 bytes per instance. This meant
that for every character or background cell drawn, 72 bytes were sent to
the GPU. In the case of a 400x100 cell grid, a total of 2.9MB would be
sent.

This patch reduces InstanceData's size to 36 bytes, a 50% improvement!
Using the above example for comparison, a worst case of 1.44MB would be
transferred.

The motivation for this patch comes from macOS. Once the terminal grid
would reach a certain size, performance experienced a sharp and dramatic
drop (render times would go from ~3ms to ~16ms). I don't want to
speculate too much on the underlying issue, but suffice it to say that
this patch alleviates the problem in my testing.

While the performance impact was most significant on macOS, with
rendering times cut by more than 50% in some cases, this also results in
a measurable performance difference on other systems with high density
grids.

Co-authored-by: Christian Duerr <contact@christianduerr.com>
2020-08-05 00:24:51 +00:00
Christian Duerr 9167461eb3
Fix crates.io publishing restrictions
This works around the problem that crates pushed to crates.io cannot
reference files outside of their crate directory.
2020-08-01 01:11:24 +00:00
Christian Duerr 7a4b4a6a24
Rename font crate to crossfont 2020-07-18 01:27:41 +00:00
Kirill Chibisov 18cf806a27
Remove gui dependencies from alacritty_terminal
This commit removes font dependency from alacritty_terminal,
so it'll simplify the usage of alacritty_terminal as a library,
since you won't link to system's libraries anymore. It also
moves many alacritty related config options from it.

Fixes #3393.
2020-07-11 20:03:09 +03:00
Kirill Chibisov 5f039cee49
Remove alacritty.yml mentions from font crate errors 2020-07-11 04:01:45 +03:00
Christian Duerr 521a58d691
Fix crash when configured font is missing
Fixes #3942.
2020-07-11 02:41:45 +03:00
Kirill Chibisov 8bd2c13490
Add option to run command on bell
Fixes #1528.
2020-07-10 22:32:44 +03:00
Christian Duerr 46c0f352c4
Add regex scrollback buffer search
This adds a new regex search which allows searching the entire
scrollback and jumping between matches using the vi mode.

All visible matches should be highlighted unless their lines are
excessively long. This should help with performance since highlighting
is done during render time.

Fixes #1017.
2020-07-09 21:45:22 +00:00
Christian Duerr 7aafbb757d
Remove copyright notice from files
Keeping the license as part of every file bloats up the files
unnecessarily and introduces an additional overhead to the creation of
new modules.

Since cargo already provides excellent dependency management, most of
the code-reuse of Alacritty should occur through Rust's dependency
management instead of copying it source.

If code is copied partially, copying the license from the main license
file should be just as easy as copying from the top of the file and
making some adjustments based on where it is used is likely necessary
anyways.
2020-06-06 21:49:14 +03:00
Kirill Chibisov a14c51797f
Fix build warnings on macOS/Windows 2020-05-27 14:46:52 +00:00
lbonn 77f2d6e853
Fix emojis being blended with background
Fixes #1864.
2020-05-12 16:23:35 +03:00
Christian Duerr 81ce93574f
Extend style guideline documentation 2020-05-05 22:50:23 +00:00
Kirill Chibisov 38d20d0c39
Call glFinish right after swap_buffers on X11
On X11 `swap_buffers` does not block for vsync. However the next OpenGl command
will block to synchronize (this is `glClear` in Alacritty), which causes a
permanent one frame delay.

Calling `glFinish` after swapping buffers forces Alacritty to finish the buffer
swap before returning control to the event loop.

Fixes #3061.
2020-05-01 20:57:25 +00:00
Matthias Krüger 6b45780f3a
Fix clippy warnings 2020-05-01 19:28:43 +00:00
Kirill Chibisov 33abfe34a8
Add config option to set cursor thickness
Fixes #3526.
2020-04-15 03:50:34 +00:00
Matthias Krüger b48e2fc2d8
Remove std::fs::read_to_string reimplementation 2020-03-17 00:50:27 +00:00
Kirill Chibisov f48204eee2 Add font metric caching 2020-01-25 00:42:23 +01:00
Kirill Chibisov 767d59155a Fix stack overflow when printing shader error
Fixes #3238.
2020-01-21 23:36:44 +01:00
Christian Duerr c34ec12c30
Bump glutin to 0.22.0
Fixes #3165.
2020-01-10 01:51:37 +00:00
sterlingjensen 05df4f4dba Replace deprecated Error methods 2020-01-03 00:17:22 +00:00
Kirill Chibisov 79b19176ee Add support for colored emojis on Linux/BSD
Fixes #153.
2019-12-09 23:12:44 +01:00
Cole Helbling c104215ae3 Remove unused PackedVertex struct
All references to `PackedVertex` were removed in #2066, so there is no
reason to keep it around.
2019-11-26 22:02:47 +01:00
Kirill Chibisov 474032742b Move renderer from alacritty_terminal to alacritty 2019-11-23 18:08:52 +01:00