aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src/renderer/mod.rs
Commit message (Collapse)AuthorAge
* Merge remote-tracking branch 'vendor/master' into graphicsAyose2025-07-23
|\
| * Migrate to 2024 editionChristian Duerr2025-07-13
| |
| * Remove cstr! macro in favor of literal notationKirill Chibisov2025-07-01
| | | | | | | | | | Also apply clippy changes while at it. Closes #8002.
* | Merge remote-tracking branch 'vendor/master' into graphicsAyose2025-02-24
|\|
| * Try to recover from GPU resetsKirill Chibisov2025-01-11
| | | | | | | | | | Use context robustness to get notified about GPU resets and try to recover from them by rebuilding the rendering pipeline.
| * Fix cut off wide characters in preedit stringKirill Chibisov2025-01-10
| | | | | | | | | | The wide char spacers must not be drawn, like we do for regular wide characters.
* | Merge remote-tracking branch 'vendor/master' into graphicsAyose2024-07-29
|\|
| * Unify string formattingHamir Mahal2024-07-24
| |
* | Merge remote-tracking branch 'vendor/master' into graphicsAyose2024-05-15
|\|
| * Fix IME preview overlapping textKirill Chibisov2024-04-21
| | | | | | | | | | | | | | | | | | Fix incorrect usage of the `flags` when drawing the preedit resulting in setting the `flags`, but not actually reading the value back. The logic to skip things was also used incorrectly, because the renderer does that already based on the `WIDE_CHAR` flag on the cell. Fixes: 67a433ceed (Skip whitespaces for wide chars in preedit)
* | Merge remote-tracking branch 'vendor/master' into graphicsAyose2024-02-11
|\|
| * Remove direct dependency on once_cellPhilip Dubé2023-12-29
| | | | | | With MSRV 1.70, std now contains the necessary parts.
| * Add error handling for OpenGL connection detailsPavel Roskin2023-11-22
| |
| * Remove `alacritty_config` from alacritty_terminalKirill Chibisov2023-11-10
| | | | | | | | | | There's no need to force alacritty's user configuration on other users of the crate, thus provide the options actually used by alacritty_terminal itself.
| * Fix typosPavel Roskin2023-10-25
| |
| * Update winit to 0.29.1-betaKirill Chibisov2023-09-04
| | | | | | | | | | | | | | | | Make use of new winit frame throttling mechanism used in RedrawRequested, which removes the need for having Wayland queue to ask for the frame callbacks. Fixes #7011.
| * Use ahash instead of fnv and regular hash functionKirill Chibisov2023-07-24
| | | | | | | | | | | | | | | | After evaluation of the ahash with the data alacritty uses it was discovered that it's 1.5-2x times faster when getting the already hashed values, which is the primary cases for alacritty's renderer. Given that ahash is generally faster, all the HashSet and HashMap's inside the alacritty were changed to use it as a hasher function.
| * Skip whitespaces for wide chars in preeditKirill Chibisov2023-07-22
| | | | | | | | | | While we skip the spacers for the wide characters in the grid due to them having a proper flags, the draw_string method was generating the cells with incorrect flags leading to wide chars being cut off.
| * Improve renderer debuggabilityKirill Chibisov2023-05-21
| | | | | | | | Make the renderer more debuggable by adding extra logging and using `GL_KHR_debug` when running with the debug log level.
* | Merge remote-tracking branch 'vendor/master' into graphicsAyose2023-03-01
|\|
| * Make gles2 renderer actually gles2Kirill Chibisov2023-02-07
| | | | | | Fixes #6209.
* | Merge remote-tracking branch 'vendor/master' into graphicsAyose2022-12-02
|\|
| * Add 'debug.renderer' config optionKirill Chibisov2022-11-28
| | | | | | | | | | This should help trouble shooting the renderer being created and different renderer options to determine when something like dual-source rendering isn't working.
| * Update glutin to 0.30.0Kirill Chibisov2022-11-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The glutin 0.30.0 update decouples glutin from winit which provides us with basis for a multithreaded renderer. This also improves robustness of our configuration picking, context creation, and surface handling. As an example we're now able to start on systems without a vsync, we don't try to build lots of contexts to check if some config works, and so on. That also brings us possibility to handle context losses, but that's a future work. Fixes #1268.
* | Support GLES2 Renderer in sixelkumattau2022-10-05
| |
* | 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.
| * Support dual source blending in GLES2 rendererVasily Khoruzhick2022-06-08
| | | | | | | | | | | | | | | | | | GLES2 has GL_EXT_blend_func_extended extension that enables dual-source blending, so essentially we can reuse fragment shader from GLSL3 renderer and do 1 rendering pass instead of 3 for the text. Co-authored-by: Kirill Chibisov <contact@kchibisov.com> Co-authored-by: Christian Duerr <contact@christianduerr.com>
| * 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.
| * 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.
| * 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>
| * 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.
| * Add support for drawing undercurlsKirill Chibisov2022-02-08
| | | | | | Fixes #1628.
| * Clean up and abstract shader creation codeoxalica2022-01-30
| | | | | | Co-authored-by: Christian Duerr <contact@christianduerr.com>
| * Account for font.offset and glyph.offset in built-in fontKirill Chibisov2022-01-29
| | | | | | | | This commit takes into account `font.offset` and `font.glyph_offset` when generating built-in font.
| * Add option to control built-in box drawing charszandr2022-01-29
| | | | | | | | | | This commit adds the config `font.builtin_box_drawing` option to control built-in font, which is enabled by default.
| * 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 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.
| * 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.
| * Update rustfmt configurationChristian Duerr2021-10-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this change I went through all current rustfmt configuration options and expanded our existing configuration with overrides whenever deemed appropriate. The `normalize_doc_attributes` option is still unstable, but seems to work without any issues. Even when passing macros like `include_str!` that is recognized properly and not normalized. So while this wasn't an issue anywhere in the code, it should make sure it never will be. When it comes to imports there are two new major additions. The `imports_granularity` and `group_imports` options. Both mostly just incorporate unwritten rules that have existed in Alacritty for a long time. Unfortunately since `alacritty_terminal` imports in `alacritty` are supposed to be separate blocks, the `group_imports` option cannot be used.
* | 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
|\|
| * Fix startup caching of bold glyphsChristian Duerr2021-05-20
| |
| * Update crossfont to 0.3.0Christian Duerr2021-05-01
| |
* | Merge remote-tracking branch 'vendor/master' into tmp1Ayose2021-04-01
|\|