Skip to content

Visual Studio Code, rebuilt in Rust

Rust

docs(port): name the unported outer shadow clip as an open gap

rokarturaf078d91026f
diff --git a/port/notes.md b/port/notes.md
index bbe265e88ee..6cf31705869 100644
--- a/port/notes.md
+++ b/port/notes.md
@@ -1112,7 +1112,7 @@ Work the port does at another time than 1.147.0, accepted with a measured same r
- Ported on `gpui-fast-b1-fidelity`, so the `shortcut:` fallbacks are gone: `Window::paint_backdrop_blur` (`quick_input_view.rs` `frosted_glass`, `corner_lab.rs`), `Window::layout_subpixel_x` and `TextStyle::strut_size` (189efc4c454; `file_icons.rs`, `icon_label.rs`), `ListState::with_whole_pixel_item_heights` (40f47558cba; `settings_editor_view.rs`). Still missing: `Menu::window_menu` (gpui-fast's gpui_macos makes the menu titled "Window" the windows menu; a translated title loses it), a gpui_macos change outside the fidelity work.
- `chromium_baseline` (189efc4c454) is `gpui::chromium_baseline` again, used by `text_system/line.rs` and `file_icons.rs`.
- Backdrop blur on gpui-fast: a polychrome sprite with texture index `u32::MAX` (`fast/backdrop.rs`, above the layer tile, rounded clip and dynamic texture ranges), blur radius and tint in the tile's fields, so the scene orders, replays and clips it like any sprite without a new primitive kind; `gpui_apple/src/fast/backdrop.rs` draws it with Wu's renderer (cc9caa16123, 471caaf3f25: mirrored crop, Skia's progressive downscale to sigma 4, `MPSImageGaussianBlur`). Reading the drawable ends the render pass, so a frame with a blur skips the opaque pre-pass and clears `framebufferOnly`. On other platforms and inside `paint_layer` (tiles do not hold what is under them) the tint paints as a quad. Compared: Wu's own patch (ours, fits the corner lab's 9 and 1 limits, chosen); lattice-writer/lattice `gpui/patches/gpui-fast-backdrop-blur.diff` (Apache-2.0, same sprite trick and `MPSImageGaussianBlur` on a newer gpui-fast with element scale, but clamped at the region's edge, not mirrored, and without the downscale, so it misses the lab's limits; does not apply here; its layer and non-Metal fallback was taken); zed and gpui-component have only the window-level `WindowBackgroundAppearance::Blurred`.
- - `Window::paint_drop_shadows` lost Wu's `opaque_background` argument; the terminal passed `false`, which is what gpui-fast always does.
+ - `Window::paint_drop_shadows` lost Wu's `opaque_background` argument; the terminal passed `false`, which is what gpui-fast always does. Open gap, the shadow half of 471caaf3f25: gpui-fast does not clip an outer shadow out of the border box at all, so the port needs `element_bounds` and `element_corner_radii` in `Shadow` (scene.rs), read by gpui_apple's and gpui_windows' shadow shaders.
- `Keystroke::parse` and `KeyBinding::new` take `&'static str`, `Keystroke::unparse` an `OperatingSystem`: runtime strings go through `crate::parse_keystroke` (`parse_with_os` with `crate::host_os()`, Wu's `secondary-` rule) and the menu bar's key equivalents through `KeyBinding::load` with the `App`, so `native_menus` takes `cx`.
- `ScrollEvent` has a `source` (the scroll frame-time test sends `ScrollSource::Pointer`); `ScrollWheelEvent` and `on_scroll_wheel` are deprecated aliases, left as they are (warnings only).
- `Glyph` lost its `IntoElement` impl: gpui-fast implements it for every `Element`.