aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src/display
Commit message (Collapse)AuthorAge
...
| * Fix general and instance class set on window (#6276)Ulrik de Muelenaere2022-08-20
| | | | | | | | This fixes a regression introduced in 7d708d5, which caused the general and instance class to be swapped.
| * Bump glutin to 0.29.1Kirill Chibisov2022-08-10
| | | | | | | | | | | | | | | | Fixes #6239. Fixes #5975. Fixes #5876. Fixes #5767. Fixes #4484. Fixes #3139.
* | Merge remote-tracking branch 'vendor/master' into graphicsAyose2022-08-04
|\|
| * Fix visible regex match on tall viewportsPeter DeLong2022-07-26
| | | | | | | | | | | | The end of the search window is currently calculated using the viewport start instead of the end. The observed behavior is that all hinting stops suddenly after line 101. This was introduced in #6139 when the code was refactored into this file from display/content.rs.
| * Fix clippy warningsChris Copeland2022-07-25
| |
| * Replace `map().unwrap_or()` with `map_or()`Chris Copeland2022-07-20
| | | | | | Use a `map_or` instead of a `map().unwrap_or()` chain.
| * Fix thin strokes on macOSChris Copeland2022-07-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the `font.use_thin_strokes` config, which only did anything on macOS and only prior to Big Sur. Instead, we will enable or disable "font smoothing" on macOS based on the `AppleFontSmoothing` user default. These changes let users get the "thin strokes" behavior by setting `AppleFontSmoothing` to 0 with: ```sh $ defaults write -g AppleFontSmoothing -int 0 ``` (Or replace `-g` with `org.alacritty` to apply this setting only to Alacritty.app, rather than the whole system.) Add a `removed` config attribute to show helpful warnings to users who are using config options that don't do anything anymore, and apply this attribute to `font.use_thin_strokes`. Bump `crossfont` to 0.5.0 to pick up the new font smoothing behavior. This release also includes a fix for a crash when trying to load a disabled font. Fixes #4616. Fixes #6108.
* | Merge branch 'master' into graphics-privateAyose2022-07-13
|\|
| * Fix hyperlinks not being keyboard actionableKirill Chibisov2022-07-11
| | | | | | | | | | | | This fixes a typo in 694a52b which was filtering all hyperlinks, except only duplicated ones when opening them with keyboard. Co-authored-by: Christian Duerr <contact@christianduerr.com>
* | Allow overlapping graphics.Ayose2022-07-13
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Highlight graphics to show hints.Ayose2022-07-12
| | | | | | | | | | Similar to the underline line rendered when the cursor is over an hyperlink, for graphics we now render a border around the graphic.
* | Allow replacing part of a graphic with text.Ayose2022-07-12
| | | | | | | | | | | | | | | | | | 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.
* | Merge with alacritty/masterAyose2022-07-12
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Add support for hyperlink escape sequenceKirill Chibisov2022-07-10
| | | | | | | | | | | | | | This commit adds support for hyperlink escape sequence `OSC 8 ; params ; URI ST`. The configuration option responsible for those is `hints.enabled.hyperlinks`. Fixes #922.
| * Fix resize on Wayland when creating new windowKirill Chibisov2022-06-29
| | | | | | | | | | | | | | When we have currently active context when asking EGL on Wayland to create new context it'll lock the backing buffer of surface using that context. So making it non-current before-hand to prevent it. Follow-up to 90552e3.
| * Fix flickering during resize on WaylandKirill Chibisov2022-06-09
| | | | | | | | | | This also fixes an issue of windows not being rendered while resizing. Fixes #6069.
| * Fix crash when damaging off-screen hintKirill Chibisov2022-06-06
| | | | | | Co-authored-by: Christian Duerr <contact@christianduerr.com>
| * Fix a few minor clippy lintsYuri Astrakhan2022-06-02
| |
| * Fix Vi cursor not being damaged on scrollKirill Chibisov2022-05-26
| | | | | | | | | | There's no need to damage intermediate Vi mode cursor points, since it can't change the terminal content meaning that only the previous and current vi cursor's viewport points matter to damage it properly.
| * Enable damage tracking only on WaylandKirill Chibisov2022-05-20
| | | | | | | | | | | | | | | | | | | | Other platforms don't have such concepts in general or have them via different interfaces not related to EGL. This commit also resolves some minor clippy issues. Fixes #6051. Co-authored-by: Christian Duerr <contact@christianduerr.com>
| * Fix cell_height of impl From<SizeInfo<f32>> for WindowSizekumattau2022-04-16
| |
| * Extract `SizeInfo` from alacritty_terminalKirill Chibisov2022-04-06
| | | | | | | | | | The `SizeInfo` is a SizeInfo used for rendering, which contains information about padding, and such, however all the terminal need is number of visible lines and columns.
| * Persist OpenGL context creation flagsKirill Chibisov2022-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | This commit persists OpenGL context creation flags from previous window build attempts saving time in multiwindow context. It also creates window as srgb by default, since it's what Alacritty is rendering in. For reference [1] and [2]. Moreover the fallback for 10 bit colors is also added. [1] - https://github.com/alacritty/alacritty/issues/4939 and [2] - https://github.com/alacritty/alacritty/issues/3756. Fixes #4703.
| * Add colored underline supportKirill Chibisov2022-03-16
| | | | | | | | | | | | | | | | | | This commit adds support for colored underline and refines the dynamic extra storage. The extra storage now is using `Arc` making cloning it way faster compared to `Box` approach which scales really well when it comes to cloning in `Term::write_at_cursor`, since cloning `Arc` is constant time. Fixes #4142.
| * Fix line indicator damage computationKirill Chibisov2022-03-10
| | | | | | | | The starting point of damage should be computed from the right side of the terminal, not from the starting point of line indicator.
| * Add fallback GLES2 rendererKirill Chibisov2022-03-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently Alacritty only works on hardware which supports OpenGL 3.3 or more, which can become problematic with older devices. This patch adds a new GLES2 renderer, since it is much more widely supported, especially on weaker hardware like phones or a Raspberry Pi. While the GLES2 renderer is slower than the OpenGL 3.3+ version, it is still significantly faster than software rendering. However because of this performance difference it is only used when necessary and there should be no difference for machines supporting OpenGL 3.3+. The two renderers are largely independent and separated in the `renderer/text/glsl3` and `renderer/text/gles2` modules. Separate shaders are also required for text rendering. The rectangle rendering for underlines and the visual bell works identically for both versions, but does have some version-specific shader code. Fixes #128. Co-authored-by: Christian Duerr <contact@christianduerr.com>
| * Add `ToggleMaximized` key binding actionChris Copeland2022-02-27
| |
| * Don't load font twice during display creationKirill Chibisov2022-02-18
| | | | | | | | | | This commit finishes the effort from a64553b to avoid reloading font twice during startup, since the original issue is with getting font metrics without building the glyph cache.
| * Reuse Rasterizer in Display::newGreg Depoire--Ferrer2022-02-16
| | | | | | | | | | | | | | Instead of creating a `Rasterizer` to guess the window dimensions, dropping it and then creating a new one for the glyph cache, reuse the same `Rasterizer`. This prevents the font from being loaded twice during startup.
| * Clear damage rects right after drawingKirill Chibisov2022-02-11
| | | | | | | | Since we could queue damage before we get into the actual rendering we should clear it after drawing not before.
| * Fix terminal not being damage when only font size changedKirill Chibisov2022-02-10
| | | | | | | | | | If font size changes however the cells stay the same the terminal won't be damaged, since it wasn't resized, however the visual change happened, thus the entire screen should be damaged.
| * Add support for drawing undercurlsKirill Chibisov2022-02-08
| | | | | | Fixes #1628.
| * Fix renderable_cursor method documentationThomas Churchman2022-02-03
| | | | | | | | | | This method no longer returns an `Option` since #5773. Co-authored-by: Kirill Chibisov <contact@kchibisov.com>
| * Add damage tracking and reporting to compatible compositorsKirill Chibisov2022-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows compositors to only process damaged (that is, updated) regions of our window buffer, which for larger window sizes (think 4k) should significantly reduce compositing workload under compositors that support/honor it, which is good for performance, battery life and lower latency over remote connections like VNC. On Wayland, clients are expected to always report correct damage, so this makes us a good citizen there. It can also aid remote desktop (waypipe, rdp, vnc, ...) and other types of screencopy by having damage bubble up correctly. Fixes #3186.
| * Log used display server on Linux/BSDKirill Chibisov2022-01-30
| | | | | | This also fixes a bug where the welcome log message wasn't logged.
| * Use `with_position` instead of `set_outer_position`Kirill Chibisov2022-01-11
| | | | | | | | This uses `with_position` method on a `WindowBuilder` instead of setting window position on the created window later on.
| * Use builtin font for box drawing unicode charactersKirill Chibisov2022-01-06
| | | | | | | | | | | | | | | | | | | | | | | | This commit adds hand rolled drawing of unicode box drawing[1] and block elements[2] from ranges U+2500 up to U+259f. While using system font for such characters will look better most of the time, the characters tend to overlap or not align, so providing builtin font is the lesser evil here. [1] - https://www.unicode.org/charts/PDF/U2500.pdf [2] - https://www.unicode.org/charts/PDF/U2580.pdf Fixes #5485.
| * Add title/class CLI parameters to create-windowKirill Chibisov2022-01-03
| | | | | | | | | | This adds the ability to pass title and class over IPC via the create-window subcommand, so users can run only one instance for windows of different spurposes in the window managers of their choice.
| * Fix CreateNewWindow CLI fallbackChristian Duerr2021-12-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing behavior for the new CreateNewWindow actions was to always pass in their own options, which would discard the existing options configured on the terminal's PTY config. To fix this the behavior for CreateNewWindow is now the same as for the initial window creation, the config values are overwritten conditionally based on their individual presence in the CLI options. However all temporary CLI options set on the "master" Alacritty instance are discarded by all future windows. Fixes #5659.
| * Bump glutin to 0.28.0Kirill Chibisov2021-12-03
| | | | | | | | | | | | | | | | Fixes #5603. Fixes #5422. Fixes #5350. Fixes #4105. Co-authored-by: Christian Duerr <contact@christianduerr.com>
| * Add parameters to `msg create-window` subcommandKirill Chibisov2021-11-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Alacritty's `msg create-window` subcommand would previously inherit all the CLI parameters from the original executable. However not only could this lead to unexpected behavior, it also prevents multi-window users from making use of parameters like `-e`, `--working-directory`, or `--hold`. This is solved by adding a JSON-based message format to the IPC socket messages which instructs the Alacritty server on which CLI parameters should be used to create the new window. Fixes #5562. Fixes #5561. Fixes #5560.
| * Fix crash with empty post-processed matchesScott Freeman2021-11-11
| | | | | | | | | | Fixes #5492. Co-authored-by: Christian Duerr <contact@christianduerr.com>
| * Add multi-window supportChristian Duerr2021-10-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously Alacritty would always initialize only a single terminal emulator window feeding into the winit event loop, however some platforms like macOS expect all windows to be spawned by the same process and this "daemon-mode" can also come with the advantage of increased memory efficiency. The event loop has been restructured to handle all window-specific events only by the event processing context with the associated window id. This makes it possible to add new terminal windows at any time using the WindowContext::new function call. Some preliminary tests have shown that for empty terminals, this reduces the cost of additional terminal emulators from ~100M to ~6M. However at this point the robustness of the daemon against issues with individual terminals has not been refined, making the reliability of this system questionable. New windows can be created either by using the new `CreateNewWindow` action, or with the `alacritty msg create-window` subcommand. The subcommand sends a message to an IPC socket which Alacritty listens on, its location can be found in the `ALACRITTY_SOCKET` environment variable. Fixes #607.
| * Fix cursor inversion logicChristian Duerr2021-10-22
| | | | | | | | | | | | | | | | | | | | | | | | The existing cursor inversion logic was causing more problems than it solved, without solving the problem of invisible cursor when inverting a cell with matching foreground and background colors. This patch reworks this logic and only inverts the cursor when the foreground and background colors of the cursor are similar and the cursor colors aren't set to fixed RGB values. Fixes #4564. Fixes #5550.
| * Fix vi indicator obstructing vi mode cursorChristian Duerr2021-09-27
| | | | | | Fixes #5504.
* | Merge remote-tracking branch 'vendor/master' into graphicsAyose2021-09-23
|\|
| * Add option to apply opacity to all background colorsKirill Chibisov2021-08-16
| | | | | | | | | | | | | | In some cases it could be desired to apply 'background_opacity' to all background colors instead of just 'colors.primary.background', thus adding an 'colors.opaque_background_colors' option to control that. Fixes #741.
| * Fix clippy warningsChristian Duerr2021-07-03
| |
* | Merge remote-tracking branch 'vendor/master' into graphicsAyose2021-05-29
|\|
| * Improve rendering performanceChristian Duerr2021-05-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR combines a couple of optimizations to drastically reduce the time it takes to gather everything necessary for rendering Alacritty's terminal grid. To help with the iteration over the grid, the `DisplayIter` which made heavy use of dynamic dispatch has been replaced with a simple addition to the `GridIterator` which also had the benefit of making the code a little easier to understand. The hints/search check for each cell was always performing an array lookup before figuring out that the cell is not part of a hint or search. Since the general case is that the cell is neither part of hints or search, they've been wrapped in an `Option` to make verifying their activity a simple `is_some()` check. For some reason the compiler was also struggling with the `cursor` method of the `RenderableContent`. Since the iterator is explicitly drained, the performance took a hit of multiple milliseconds for a single branch. Our implementation does never reach the case where draining the iterator would be necessary, so this sanity check has just been replaced with a `debug_assert`. Overall this has managed to reduce the time it takes to collect all renderable content from ~7-8ms in my large grid test to just ~3-4ms.