Skip to content

Scene: keep per-output visibility across paints (#388) - #394

Merged
joske merged 35 commits into
joske:masterfrom
ariel3259:perf/388-walk-reuse
Dec 1, 2026
Merged

joske merged 35 commits into
joske:masterfrom
ariel3259:perf/388-walk-reuse

Conversation

@ariel3259

@ariel3259 ariel3259 commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Part of #388 (idle CPU). Replaces #391.

The scene redid its visibility work — which windows show on each output, their visible pieces, what covers them — on every tick, for every output, even when only damage changed. In Samueru's profile visit_window_subtree was 8.9% of samples (inclusive) and children_index 4.75%; #391's counters saw 22,830 builds in 60 s with an unchanged window tree.

This follows Xorg's model: visibility is recomputed when the tree changes (where ValidateTree would run), not on paint. The per-tick half (draws, damage) is split from the geometry half as in the wlroots scene graph.

Change

1. Paint wake. A protocol paint (CopyArea, PutImage, border paints, root background, root-scanout copy — 11 sites) now calls wake_for_paint instead of wake_for_damage. It schedules only the outputs where the painted drawable has pieces (via the store's existing pending-presentation damage) and no longer raises scene_structure_dirty, which forced a walk on every output. Structural callers keep wake_for_damage. With YSERVER_DAMAGE_AUDIT=1 paints still raise structure, so the audit keeps comparing every output. A tick that only commits an in-flight cursor (CursorCommitInFlight) no longer counts as a walk (TickOutcome::walked()).

2. Kept visibility per output. Each output keeps the geometry of its last walk: every node that reached emit_node, in computation order, with its visible pieces, plus the inputs that walk saw. It holds no image view, extent, draw or damage — those are read live every tick, so a DRI3 promotion or a backing swap is picked up without a counter. emit_node is split into a geometry half and a per-tick half that runs identically on fresh and on kept pieces.

A tick replays the kept geometry when all of these are unchanged, and walks in full otherwise:

  • TrackedWindows::generation()
  • the backend's shape generation
  • DrawableStore::topology_generation(), narrowed to Window/Root bindings, participation, redirect target and content offset (pixmap churn no longer moves it)
  • the top-level order, the output's OutputLayout, and cow_host_xid

A kept source that no longer resolves falls back to a full walk on the same tick. Under YSERVER_DAMAGE_AUDIT=1 (existing flag) every valid tick is also compared field by field with a fresh walk; a mismatch logs damage-audit validation-mismatch output=N field=<name> and the tick uses the fresh result.

3. The windows generation counts changes its readers can see. TrackedWindows bumped on every DerefMut. On real hardware xterm sends ChangeWindowAttributes(CWBackPixel) with the value the window already has before each clear (~160/s with two busy xterms), so kept visibility was invalidated on almost every tick. DerefMut now only marks the map possibly changed. On the next read, generation() compares a per-window TrackedGeometry projection with a snapshot, and bumps only if it differs. The projection holds exactly the fields that the walk or the subwindow clip cache reads: x, y, width, height, depth, mapped, parent, stack_rank, border_width, viewable. Cursor, background and border-colour changes (GTK's DefineCursor on hover) leave it unchanged. Equal values mean equal projected contents; the converse does not hold. Every reader keeps its call, and no mutation site changes.

Nothing client-visible changes: exposures, ClipNotify, clip lists and composed pixels are the same.

Telemetry (YSERVER_LOOP_TELEMETRY=1): walk_cause/s[outN[structure= presentation= first_frame= owed= pending_structure= audit=]], scene_full_walks/s[outN=], scene_valid_ticks/s[outN=].

Numbers

Release bench (tick_build_bench, the walk_bench e16-like fixture at 2560×1440, root + 10 shaped top-levels × 6 children, best of 5): valid tick 65.9 µs vs full walk 219.7 µs (~3.3×).

Real KMS, xfwm4 + two xterms running yes and top, 1920×1080, one output:

full walks/s valid ticks/s avg scene build
plans 1+2 only, AMD (Ryzen iGPU) ~50 0–5 22–25 µs
this branch, AMD 0 41–64 1.9 µs
this branch, NVIDIA (RTX 5060 Ti, 620.73) 0 18–36 1.9–2.2 µs

Dragging a window (≈530 moves in 10 s) walks in full as expected (~55/s, 17–22 µs per build). 15 s of pointer motion over the windows: 0 full walks, 26–48 valid ticks/s, no cursor EBUSY. Screenshots clean on both GPUs.

Samueru's idle measurement (RX 580, 3 outputs at 1440×900, i3 + polybar + fastcompmgr, against base 3e09d8a9; #394 (comment)): master 7.83% / 7.73% CPU, this PR (87d1a690) 7.17% / 7.17%, with the same presents and queue_submit2/s. That is ~0.6 points, ~8%. At idle, scene_full_walks/s is 0 on all three outputs and scene_valid_ticks/s is 107–116 per output.

This removes the scene-walk share of the profile only; the submit count discussed in #388 (redirect_iso, the flush before each DamageNotify) is untouched.

Tests

Backend tests on lavapipe go through dispatch_raw, maybe_composite and on_host_input. Each fails under a named mutation.

  • paint_wake.rs:
    • One routing test: a paint builds only its output, with cause presentation.
    • A spanning window ticks both outputs, and a window with no pieces ticks every output.
    • One table with a row per converted paint site (11), each scheduled by its own store damage, plus a quiet row: a paint that writes nothing leaves the scene quiet.
    • A paint during an in-flight cursor commit is composed after it retires.
    • The audit keeps every-output walks.
  • scene_validation.rs:
    • each_non_structural_change_keeps_visibility_valid checks each row against a fresh build. Rows: paint, pixmap churn, SW cursor motion, a deferred Present, and each unread window field (CWBackPixel, CWBackPixmap, CWBorderPixel, CWBorderPixmap, CWCursor).
    • each_structural_change_walks_in_full, the families table, asserts a full walk and the moved mark for each row: configure, restack, a child restack followed by a no-op borrow, shape, redirect, unredirect, participation, in-place content offset, map, unmap, destroy, redirected resize, COW materialization, root resize, output layout.
    • DRI3 promotion is read live on a valid tick.
    • A covered paint goes dormant and heals.
    • An output rebuild drops the kept state, and OtherOutput damage works on a valid tick.
    • The audit repairs a wrong kept state.
    • A dead source walks in full on the same tick.
  • Render crate: walk_needed over all 64 input combinations.

Also fixed in its own commit (present_scanout::hidden_cursor_allows_fullscreen_direct_scanout_without_unflip, test-only): a pre-existing load flake — the test did not reset the probe interval like its siblings, so observe_scanout_m0 reset m1_probe_reject after 1 s under load.

Gate: fmt, clippy (default, tcp-transport, xdmcp, windows, freebsd), cargo build --bin yserver alone in debug and release, workspace tests, the workspace --ignored lavapipe suite, the audit tests with YSERVER_DAMAGE_AUDIT=1, layout check, just man, and 5 loaded runs of the touched suites.

🤖 Generated with Claude Code

ariel3259 and others added 29 commits December 1, 2026 00:26
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…putation order (review r1)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…mmitInFlight pre-walk, full audit compare (review r2)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…g/wlroots model) instead of a keyed walk cache

Part 2 rewritten: keep only per-output geometry (nodes, pieces, occlusion),
read the sampled view and extent live, invalidate on structural change.
Part 1 also moves software-cursor motion to wake_for_cursor_damage.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…full SceneBuild audit, storage invariants (review r3)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y counters, unresolved source, test 2 mutations (review r4)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Test 4 exports the NameWindowPixmap backing, not the window XID;
diagnosis states inclusive/self and what the window-map count proves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lidated visibility)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Plan 1: counters task first and builds_per_output defined once on them;
ticks through Backend::maybe_composite; real lvp-env file chained with
&& and a SKIP recording_scene check; one site test per draw.rs line
anchor; reachable mutations for the spanning, no-pieces and
write-nothing cases; WalkCause pub in telemetry.rs; fixed-size
per-output telemetry storage; dormancy test accessor.

Plan 2: tests observe through test-only SceneBuildObservation /
SceneBuildProbe built in yserver-render (SceneBuild and
scene_build_diff stay crate-private) and the build each tick used;
store tests on the Vulkan fixture with unmasked mutations; in-place
content offset path; partially covered window for HiddenDamage; DRI3
order, narrow skip and coordinator hardware runs; BuildKind
pub(crate) in telemetry.rs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Plan 1: the no-pieces test reaches an armed off-output window by moving
it off after a settle (a no-background map still records damage); site
tests use the for_tests_scene_wants_compose wrapper.
Plan 2: re-export the for_tests observation types; the redirected-resize
mutation removes topology and window generation; the DRI3 hardware
mutation run is flagged as undefined behaviour in the consent request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… settle (review r3)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
walk_needed now returns the first true input as a WalkCause, and every
scene build on an output is counted by its cause in the telemetry bucket
and lifetime view. The scene telemetry line reports the per-output counts.
Adds the two-output paint fixture used by the paint-wake tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Implemented-By: Claude Haiku 5.5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Implemented-By: Claude Haiku 5.5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Implemented-By: Claude Haiku 5.5
…llscreen_direct_scanout_without_unflip

Sibling tests reset scanout_m0.interval_start before observing a
candidate. This one did not, so under CPU load the observation ran
more than one second after backend creation and the M1 probe reset
m1_probe_reject, failing the assertion. Test-only; no production change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Implemented-By: Claude Haiku 5.5
…round (joske#388)

Moves five backend paint sites from wake_for_damage to wake_for_paint:
the tiled and solid border rings (paint_window_border_within), the
root background pixel and pixmap setters, and the root-scanout copy
(try_copy_area_root_scanout). Each write they make is recorded through
DrawableStore::damage, and none changes a walk input.

Adds paint_wake tests for each site, plus a border count test and
clipped_paint_leaves_the_scene_quiet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Implemented-By: Claude Haiku 5.5
A tick skipped for an in-flight cursor commit returns before build_scene,
so it is a pre-walk skip like PendingAcks. Counting it as a walk made the
dormancy reconcile run on a tick that built nothing, which put a paint's
window to sleep on the output still waiting for its cursor commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Implemented-By: Claude Haiku 5.5
…an fail

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
)

The store's topology_generation bumped on every pixmap allocation and
free. Visibility never reads pixmap bindings, so pixmap churn now leaves
it unchanged: allocate, detach, rebind, decref and destroy bump only for
a Window or Root binding. set_content_offset bumps when the stored offset
changes, for any drawable kind. set_scene_participating and
set_redirected_target keep their bumps.

SceneInput gains windows_generation and shape_generation, the two
generations the kept visibility state is validated against. scene_input
fills them from TrackedWindows::generation and the backend's
shape_generation at every call site.

Tests in tests/scene_validation.rs pin the narrowed rule (pixmap churn,
window binding changes, content offset) and that every shape writer
moves shape_generation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Implemented-By: Claude Haiku 5.5
…oske#388)

node_pieces computes a node's visible pieces per place rect in emission
order. emit_with_pieces runs the per-tick half on those pieces: draws,
signature, sampled and pieces ids, damage and the snapshot. It reads the
source's sample view and, under On, its storage extent live from the
store. Under Off the caller's denominators are kept, so Off output is
unchanged.

emit_node composes the two and returns None when the source does not
resolve or has a null image view. Its callers push no presence then.

Adds split_emit_matches_full_walk_bit_for_bit, a digest of the e16-like
walk in both modes, pinned from the code before the split.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Implemented-By: Claude Haiku 5.5
…ucture (joske#388)

Each output keeps the geometry of its last On walk: every node that reached
emit_node, in computation order, with its visible pieces per place rect, and
the walk's structural counters. A tick whose validation inputs are unchanged
(windows and shape generations, the narrowed store topology generation, the
top-level order, the output layout and cow_host_xid) replays that geometry
through the per-tick half of emission. Draws, damage, sampled views and
extents are read live on every tick; the kept state holds none of them.

emit_node is split into node_pieces (geometry) and emit_with_pieces (per-tick),
and both paths run the same code in the same order. A kept node whose source
no longer resolves falls back to a full walk on the same tick.

Telemetry adds scene_full_walks/s and scene_valid_ticks/s per output.

Implemented-By: Claude Haiku 5.5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- covered-paint test: after the cover moves, check that U is undormant and
  that its presentation damage composed (the pending check hides dormant
  drawables, so this is checked directly).
- DRI3 test: ignore reason names the real requirement; check that the
  redirect and naming tick is a full walk.
- cursor test: the deferred Present is stood in for by its copy and
  mark_dirty; comment corrected.
- RootNode denominator doc: read under Off only.
- scene_build_pair_for_tests: builds on a copy, so the kept state is left
  as it was even when the replay falls back.

Implemented-By: Claude Haiku 5.5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ke#388)

Table-driven: each structural family (position, restack, shape, redirect, unredirect,
participation, in-place content offset, map, unmap, destroy, redirected resize, COW,
root resize, output layout) takes one valid tick, the change, and one full walk,

then matches a fresh walk and walks valid on the next unchanged tick. Each row names
the input its mutation removes; the root and output-layout rows are carried elsewhere
(replay source fallback, sync layout reset), noted in the test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Implemented-By: Claude Haiku 5.5
Drop the sync_output_layouts kept reset: the OutputLayout comparison in
KeptVisibility::matches covers every layout change it guarded (root_rect, mode,
transform), so the reset is redundant. Test-only: SceneBuildObservation records the
carried damage count. Scene validation: the per-CRTC same-size modeset rebuilds output 0

and pins it; the root row pins the Root rebind with the replay guard; the other-output
row asserts output 0 queued no flip and carried nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Implemented-By: Claude Haiku 5.5
…joske#388)

Under the damage audit, every valid tick is compared with a fresh On walk over the same live state. A difference is logged and counted, the full walk's result is used, and the kept geometry is replaced. A kept source that no longer resolves is counted and walks in full on the same tick. scene_build_diff is no longer test-only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Implemented-By: Claude Haiku 5.5
scene_build_diff lived in scene/for_tests.rs, whose SceneBuild import is
test-support only, so a plain `cargo build --bin yserver` failed. It is
the audit's production comparison: move it next to
note_validation_mismatch in damage_audit.rs. The yserver backend's two
accessors over test-support observation types are #[cfg(test)].

Every gate step built with test-support unified through the dev-dependency,
so the gate now also builds the binary on its own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, not borrows

Hardware smoke found kept visibility invalidated on almost every tick:
xterm's no-op ChangeWindowAttributes bumps TrackedWindows on each borrow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rrows

Hardware smoke (AMD, xfwm4, two xterms, YSERVER_LOOP_TELEMETRY=1): about
50 full_walks/s against 0-5 valid_ticks/s. xterm rewrites CWBackPixel with
the value it already has ~160 times/s, and every mutable borrow of the
window map bumped the generation, so each paint invalidated kept
visibility. TrackedWindows now compares the map with a snapshot on the
first read after a borrow and bumps only when its contents differ. The
spec's Part 2 described the generation as bumped by every mutable borrow;
this commit makes it a content mark, as that section intends.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Implemented-By: Claude Haiku 5.5
Test (b) pins the move + no-op outcome only; the move's dispatch already
resolves the generation, so the per-borrow snapshot mutation is caught by
no_op_rewrite_does_not_hide_an_earlier_background_change. Plan erratum.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@joske

joske commented Dec 1, 2026

Copy link
Copy Markdown
Owner

Thanks, this looks right. We went through everything the walk reads and found nothing the validity key misses, and the 11 converted paint sites all look correct. We'd like Samueru's measurement before merging, since #388 is his report.

A few things in the meantime:

  1. Fields the walk doesn't read still invalidate. TrackedWindows::generation() compares the whole map, so a change to cursor, bg_*, border_pixel/border_pixmap or viewable forces a full walk on every output, though none of them feed the walk. cursor is the one that matters: GTK sends DefineCursor on hover. Could the comparison cover only the fields the walk uses, or could those fields get their own generation?

  2. Please drop the pre-split digest test (PRE_SPLIT_DIGEST_ON/OFF in projection.rs). It hashes Debug output from code that no longer exists, so after merge nothing can regenerate it, and any Debug or WalkStats field change breaks it without a behaviour change. assert_valid_matches_fresh and the audit already compare against a fresh walk.

  3. The tests can be about half the size, in the same shape as Access control PR 4c: Receive checks on input notifications #389:

    • paint_wake.rs: the 11 *_wake_is_scheduled_by_its_own_damage tests share one body; make them one table with one row per site, and add clipped_paint_leaves_the_scene_quiet as a row. The CopyArea/PutImage/border "one output" tests and paint_build_is_counted_as_presentation all check the same per-output routing; keep one, plus the spanning-window and no-pieces cases.
    • scene_validation.rs: the families() table is the right shape and already covers map, resize, destroy, offset and shape, so window_binding_changes_move_topology, content_offset_change_moves_topology and most of every_shape_request_moves_shape_generation (10 requests reaching one function) can go. pixmap_churn_leaves_topology_unchanged duplicates pixmap_churn_keeps_visibility_valid.
    • tests/tick.rs: walk_needed_for_each_input_alone_and_not_otherwise is covered by the exhaustive walk_needed_reports_the_first_true_input.

    That should bring the tests from about 2,400 lines to about 1,100.

  4. Smaller things:

    • The doc on generation() (scene.rs:137) says reads are equal iff the contents are; only one direction holds.
    • A one-line comment in decide_node pointing at KeptVisibility::matches would help: anything the walk reads from the store needs a topology bump, and nothing enforces that.
    • Please mention in the PR description that CursorCommitInFlight no longer counts as a walk (ec66a60).

@Samueru-sama

Copy link
Copy Markdown
Contributor

Hardware idle test of this PR against its own base, same machine and desktop.

Setup. RX 580 (RADV), 3 outputs at 1440x900 ~79 Hz, i3 + polybar + fastcompmgr + wallpaper, no browser, one idle terminal. Base is master 3e09d8a9, PR is 87d1a690. Both are release builds carrying the same local discrete-RADV redirect-isolation patch from my #388 comment, and both ran with YSERVER_LOOP_TELEMETRY=1. CPU is utime+stime of the yserver process from /proc over two 60 s windows, starting 190 s and 293 s after server start, taken while the terminal was idle.

build window 1 window 2 main thread
master 3e09d8a9 7.83% 7.73% 7.20-7.32
PR 87d1a690 7.17% 7.17% 6.63-6.65

(% of one core.) Frame presents and queue_submit2 per second are the same on both sides (135-141 and 560-584), so the difference is the scene walk: about 0.6 points, roughly 8%.

PR counters at idle, both windows: scene_full_walks/s is 0 on all three outputs and scene_valid_ticks/s is 107-116 per output, so kept visibility is replayed on every build, as intended. Builds are still admitted at about 63-72/s per output with cause structure and about 44/s with presentation. I haven't traced what raises structure at idle.

Limits. One server session per side, the PR measured first, not interleaved. Within a session the two windows agree to 0.2 points, but I haven't bounded session-to-session variance, so treat the 0.6 points as indicative. The RADV workaround is on both sides, so the absolute numbers are not stock upstream. The base build has no walk counters, so I can't give its walk rate.

ariel3259 and others added 6 commits December 1, 2026 09:07
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eneration

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Implemented-By: Claude Haiku 5.5
…op the digest test

Joske's review items 2 and 3 on PR joske#394.

- Drop the pre-split digest test (split_emit_matches_full_walk_bit_for_bit)
  and walk_needed_for_each_input_alone_and_not_otherwise; the exhaustive
  walk_needed_reports_the_first_true_input and the existing walk tests keep
  the mutations they killed.
- scene_validation: one table test each_non_structural_change_keeps_visibility_valid
  absorbs the paint, pixmap churn, unread-field, cursor and present rows.
  Shape-only and topology-only helpers that no other test used are gone.
  Restored: window_binding_changes_move_topology and
  content_offset_change_moves_topology, which no other test kills.
- paint_wake: one table test each_paint_site_is_scheduled_by_its_own_damage
  replaces the 11 per-site tests and the clipped-paint test. The routing
  tests fold into the table and copy_area_on_one_output_builds_only_that_output.
- Shared helpers (u32s, tick, copy_area_at) live once in paint_wake.rs.

No production code changes.

Implemented-By: Claude Haiku 5.5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…elpers (review)

Fix round 1 for the review of 1789d6c.

- Topology: check_family asserts the topology generation moves for every row
  whose mutation names topology. The map, destroy, COW and in-place content
  offset rows now carry the topology checks, so window_binding_changes_move_topology
  and content_offset_change_moves_topology are removed.
- Projected-change witness becomes a families row (plan 3 M5).
- paint_wake and scene_validation share one request layer: Le body builder,
  req, create_window, configure, change_gc, composite-style helpers, settle_clean.
  The fixture helpers return a cleanup guard, so fixtures finish on drop.
- fixture_settles_with_nothing_pending removed: settle and the routing rows
  cover its checks.
- define_root_argb_cursor uses cursor_support::create_argb_cursor; the power
  executor and output lookup reuse per_crtc_config.
- One assert_kept_matches_fresh helper for the valid-equals-fresh checks.

No production code changes.

Implemented-By: Claude Haiku 5.5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pology bump

Also name the subwindow clip cache as a reader of the tracked projection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ariel3259

Copy link
Copy Markdown
Contributor Author

Thanks for going through it. All four items are addressed; new commits on top, nothing rewritten.

  1. Unread fields no longer invalidate (1baf5ed2). TrackedWindows now snapshots a TrackedGeometry projection per window: x, y, width, height, depth, mapped, parent, stack_rank, border_width, viewable. Those are exactly the fields that the walk or the subwindow clip cache reads; viewable is in because the clip cache reads it (paint_target.rs:438). A change to cursor, bg_pixel, bg_pixmap, border_pixel or border_pixmap keeps the generation, so a GTK DefineCursor on hover no longer forces a walk. Kept as a projection compare rather than a separate generation: no new counter, and no bump to remember at the mutation sites.
    • each_non_structural_change_keeps_visibility_valid has one row per unread field (CWBackPixel, CWBackPixmap, CWBorderPixel, CWBorderPixmap, CWCursor), each checked against a fresh walk.
    • The families table has a restack then a no-op borrow row: a child restack (only stack_rank moves), then another borrow of the map, must still walk in full.
    • Projecting cursor or bg_pixel, or dropping stack_rank, fails a named row.
  2. Digest test dropped (1789d6c0), along with walk_digest.
  3. Tests compacted (1789d6c0, 429c3c91): paint_wake.rs + scene_validation.rs went from 2,472 to 1,711 lines.
    • The 11 site tests plus the quiet case are one table. A single routing test also checks the presentation cause.
    • The structural cases, the unread-field cases and the no-op-borrow witness are rows of two tables.
    • check_family now also asserts that the topology generation moved. That let window_binding_changes_move_topology and content_offset_change_moves_topology go: their mutations fail the map and in-place content offset rows.
    • every_shape_request_moves_shape_generation, pixmap_churn_leaves_topology_unchanged and the single-input walk_needed test are gone.
    • Request builders are shared with per_crtc_config.rs and the cursor tests.
    • We stopped short of ~1,100. The rest is the request builders and settle/tick harness that the tables run on, plus scenario tests that are the only check of their behaviour (paint during an in-flight cursor commit, DRI3 promotion read live, a covered paint going dormant and healing, the audit repair). We re-ran every mutation the removed tests killed against the remaining rows, one at a time.
    • The generation() docs (backend.rs, scene.rs:135) now state only the direction that holds: equal values mean equal projected contents.
    • decide_node has the comment pointing at KeptVisibility::matches (137e3186).
    • The PR description now says CursorCommitInFlight no longer counts as a walk.

@joske
joske merged commit ef3bc7a into joske:master Dec 1, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants