Visual Studio Code, rebuilt in Rust
Rust
docs(port): record the retained frame check and the paint-time redraw trap
rokartur56fca74686a1
diff --git a/port/notes.md b/port/notes.mdindex 8dcb6fa4e6a..15854fc9d0a 100644--- a/port/notes.md+++ b/port/notes.md@@ -1120,6 +1120,8 @@ Work the port does at another time than 1.147.0, accepted with a measured same r- `Glyph` lost its `IntoElement` impl: gpui-fast implements it for every `Element`.- `VisualTestContext::all_debug_bounds` and `read_rendered_frame` (59891335621) are ported into the vendored `test_context.rs` (d3d45145b57): the hover, breadcrumbs and themes tests read the frame.- Baseline on `b867659888d` (`cargo gc test -p app`, the bin target): 3721 passed, 21 failed, 20 ignored. Layout and text snapping without the Chromium patches (16: tab, outline, quick open, search message, editor type picker and icon label widths; settings checkbox and row heights; welcome view wraps; debug toolbar, decoration outline and icon picker half pixels); rounded corners and blur (`corner_lab`); hover dropped on a key press (65696abd52a); a test's app not freed (836ad8f1b9e); Retained Mode (2: `webview_views` showing a view after a context key changed without a notify, the markdown hover's size; both pass with `GPUI_VIEW_RETENTION=0`, which leaves the other 19).+- Retained Mode differential check (B2, `fast/retained.rs` `retained_frame_difference`, `check_settled_frames`): `GPUI_RETENTION_CHECK=1 cargo gc test -p app` draws each test's settled frame (no dirty window, effect or next-frame callback left) a second time with retention off and fails the test where the painted primitives or hitboxes differ; a test can call `Window::retained_frame_difference` itself. Only settled frames: a value measured during paint (a hover's size, a list's bounds) draws a stale frame that the next one heals by design. Options compared: (1) gpui-fast's own tests (`fast/tests/splice_late_layout.rs`, `cached_layout.rs`) run a scenario twice with `set_view_retention(true/false)` and compare what the test observes, which needs every view test written twice; (2) a per-window retention toggle in a test harness (oscarbc96/parla `crates/ui_testing/src/harness.rs`, MPL-2.0), again without a frame diff; (3) one check in the draw loop over the whole suite, the one taken, since it covers the 3700 existing view tests without touching them. Zed's GPUI has no Retained Mode and no such check.+- Trap: `window.refresh()` inside paint is a no-op (`window.rs` `refresh` marks dirty only outside a draw), so a value measured in a canvas and read by the next render draws again through `part_view::redraw_after_frame` (`cx.notify` on the view after the frame), as `welcome_page.rs` does. Fixed so: markdown hover size (`hover.rs`), a list's scroll layer bounds (`list_scroll.rs`, `suggest_widget.rs`). A clock read in render uses `cx.background_executor().now()` so the test clock drives it (input caret, `input_box_view.rs`).- The 31 Wu commits (`git log -- native/vendor/wu`, newest first). Hunks: the commit's Rust and Metal hunks under `crates/`; failed: the hunks `patch --dry-run` rejects on the gpui-fast copy, each commit tried alone (a commit that builds on an earlier one also fails where that one is missing). Merge commits carry no change of their own.| Commit | Subject | Area | In gpui-fast | gpui-fast files | Hunks, failed |