aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src/renderer
Commit message (Collapse)AuthorAge
...
| * Disable depth and stencil buffersChristian Duerr2022-12-29
| | | | | | | | | | | | | | | | | | This patch reduces the active GPU memory consumption by disabling the depth and stencil buffers. During original testing it reduced GPU memory usage on Linux by almost a third. This is a reintroduction of previously reverted patch 3475e44. Closes #2881.
| * Apply 'font.glyph_offset.y' for underline/strikeoutKirill Chibisov2022-12-25
| | | | | | Fixes #6561.
* | Apply rustfmt and clippy to the current branch.Ayose2022-12-02
| |
* | 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.
| * Fix crash with very low font sizesKirill Chibisov2022-10-21
| | | | | | Fixes #6432.
| * Fix cursor and underlines always being blackKirill Chibisov2022-10-21
| | | | | | | | | | | | | | Some old hardware doesn't like universal shader approach for all the rectangle kinds leading to ALU instruction limits. This commit fixes it by splitting the shader per rectangle kind. Fixes #6417.
* | Set graphics limit per cell.Ayose2022-10-16
| | | | | | | | | | The limit per grid is increased to `1000`, and a new limit per cell is added, set to `20`.
* | Merge remote-tracking branch 'vendor/master' into graphicsAyose2022-10-16
|\|
| * Fix clippy warningsChristian Duerr2022-10-12
| | | | | | | | | | This patch applies all clippy lints currently present on the latest clippy master than are compatible with our oldstable clippy (only exception is the `_else(||` stuff).
| * Don't enable multisamplingKirill Chibisov2022-09-11
| | | | | | | | | | It never worked in the first place, because we were never requesting it in glutin, and it provides no value given that textures are already antialiased.
| * Bump glutin to 0.29.1Kirill Chibisov2022-08-10
| | | | | | | | | | | | | | | | Fixes #6239. Fixes #5975. Fixes #5876. Fixes #5767. Fixes #4484. Fixes #3139.
* | Support GLES2 Renderer in sixelkumattau2022-10-05
| |
* | Merge remote-tracking branch 'vendor/master' into graphicsAyose2022-08-04
|\|
| * 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.
* | 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.
* | Fill all cells under a graphic with the template.Ayose2022-07-12
| | | | | | | | | | | | | | | | With the template we can create hyperlinks attached to the graphic. To avoid reflow issues when a row is shrank, wrapped rows that only contain graphic cells are discarded. With this approach we loss some info, like the hyperlink, but the image is always properly positioned in the grid.
* | 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 flickering during resize on WaylandKirill Chibisov2022-06-09
| | | | | | | | | | This also fixes an issue of windows not being rendered while resizing. Fixes #6069.
| * 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>
| * Fix a few minor clippy lintsYuri Astrakhan2022-06-02
| |
| * Fix builtin glyphs for U+2567 and U+2568algon2022-05-20
| |
| * Fix gap in builtin box drawingKirill Chibisov2022-05-08
| | | | | | | | | | Builtin box drawing glyphs in range from '\u{2580}' to `\u{2587}` could have gap due to missing rounding. Previously height was rounded, however not the `y` offset. This commit fixes it.
| * 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.
| * Fix `font.glyph_offset` not live reloadingKirill Chibisov2022-03-11
| | | | | | Fixes #5944.
| * Use round instead of ceil for line positionKirill Chibisov2022-03-06
| | | | | | | | Ceiling line position results in strikeout line being lower than it should.
| * 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 use 'origin_upper_left' in rect shadersKirill Chibisov2022-02-22
| |
| * 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 dashed and dotted underlinesKirill Chibisov2022-02-14
| | | | | | | | This finishes implementation of underline styles provided by `CSI 4 : [1-5] m` escape sequence.
| * Add support for drawing undercurlsKirill Chibisov2022-02-08
| | | | | | Fixes #1628.
| * Fix builtin font block elements going invisibleKirill Chibisov2022-02-03
| |
| * 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.
| * Clean up and abstract shader creation codeoxalica2022-01-30
| | | | | | Co-authored-by: Christian Duerr <contact@christianduerr.com>
| * Use cell width to compute builtin font thicknessKirill Chibisov2022-01-30
| | | | | | | | | | | | | | | | | | | | | | While using underline thickness could sound logical to draw other lines most fonts don't make underlines thick compared to cell bounding box if you increase font size. So instead we're using cell width to scale builtin font nicely. This commit also adjusts arcs drawing and alignment. Fixes #5826. Fixes #5821.
| * 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
| |