Add Windows nested backdrop blur and correct translucent compositing - #10
Conversation
…ested-blur PR rev - logo (window/exe icon, in-app marks) from provided artwork - bundled default new-thread background, overridable per user - zui -> hoangvu12/zui@86f2ecef (PR zeronsh/zui#10: Windows nested backdrop blur)
wingleeio
left a comment
There was a problem hiding this comment.
Reviewed all renderer, shader, scene-batching, example, and test changes at c2d273dc3dadcb260b0fa7c35fc2fe02a14f5add, including the surrounding D3D resource/pipeline lifecycle. No evidence of malicious behavior or remaining PR-introduced security vulnerabilities was identified. This is not a guarantee of intent or absence of every vulnerability.
Before approval, fixed an unbounded shader loop for extreme finite radii (host and shader now cap sigma at 64 device pixels), rejected invalid geometry before allocation/copy, and fixed cache expiry for offscreen-only blur lists. Native pixel regressions exercise these cases. Snapshot copies are clipped to the drawable; shader constant layouts, weight indexing, COM ownership, read/write binding transitions, resize/recovery, and premultiplied-alpha composition were reviewed.
No Cargo dependency manifests or lockfile versions change in this PR. The restored test fonts match the existing Zed extraction byte-for-byte and include their licenses. The added CI uses read-only permissions and does not persist checkout credentials.
Validation passed: native Windows CI on the exact reviewed head: 24 native renderer tests, 4 scene-ordering tests, 5 SVG tests, and release example build. Locally, all 227 GPUI library tests passed on Linux, and Zeron’s workspace/all-targets check passed with the aligned pins. Zeron’s updated lockfile has zero known Cargo vulnerabilities; existing maintenance/soundness warnings remain unchanged.
Remaining scope limits: software WARP tests establish pixel correctness, not hardware scrolling performance or exact macOS appearance. Strong blur still costs GPU work. Nested panels require separate paint layers; existing same-layer/out-of-panel ordering limitations remain. The Zeron dependency update retains its current Windows theme policy.
Takes upstream PR zeronsh#10 as the superset (includes the paint-time image alpha masks the fork port was based on) and retires the fork's preview port in favor of the audited upstream implementation.
Port of zeronsh/zeron 6eae024 ("Update ZUI to audited Windows backdrop renderer"). Roboco's previous pin 86f2ecef already carried the renderer itself (authored on hoangvu12/zui fix/windows-nested-frosted-blur, merged upstream as zeronsh/zui#10). This moves the pin to upstream's declared audited rev c2d273dc, adding exactly the two missing zui-side commits: 52ec2e39 (bounds Windows blur work — MAX_SIGMA clamp, 192-tap shader cap — and validates blur geometry; plus zui-repo renderer CI and test fonts) and c2d273dc (zui-repo review-branch CI wiring). No zui-side push was needed: c2d273dc is already published on hoangvu12/zui (branch fix/windows-nested-frosted-blur). Top-level gpui/gpui_platform/gpui_tokio pins and all 16 [patch."https://github.com/zeronsh/zui"] revs move together (AGENTS.md pin rule); Cargo.lock keeps exactly one GPUI identity, all 20 zui crate sources at c2d273dc, no other dependency changes. AGENTS.md updated (it still claimed the stale aa009411 rev). Deliberately excluded: - 7f0cd13 (gpui-base pin align): hoangvu12/gpui-component does not contain the equivalent of zeronsh/gpui-component 03cd9947, and roboco's [patch] redirect already collapses every zeronsh/zui dependency onto the pinned rev — the lockfile retains one GPUI copy with gpui-base at 94c1bbaf. - Upstream's [patch] redirect to gaelcado/zui 53869c20 (per-pixel text edge fades, zeronsh/zui#12 line): not part of this ticket; roboco stays on hoangvu12/zui per AGENTS.md. Verified: cargo check -p roboco-ui; Cargo.lock inspected for a single gpui source identity.
Adds within-window frosted backdrop blur on Windows, including nested panels with separate paint layers. Content behind a panel is blurred while later foreground stays sharp. Corrects translucent source-over alpha, clipping at fractional display scales, and fine-pattern filtering. Scene batching now respects blur boundaries for all primitive kinds.
The security review added a 64-device-pixel sigma limit in the host and shader, invalid-geometry guards before allocation/copy, and cache expiry for offscreen-only blur lists. Extreme radii are clamped; nonfinite radii and invalid geometry are ignored. GPU resources are reused and released on resize, device recovery, or 120 unused frames.
Validation on
c2d273dc3dadcb260b0fa7c35fc2fe02a14f5add: Windows CI passed 24 native renderer tests (including WARP pixel/security regressions), 4 scene-ordering tests, 5 SVG tests, and the release backdrop example build. All 227 GPUI library tests passed locally on Linux. Native CI was added, and the existing SVG font fixtures were restored with their licenses.Strong blur still costs GPU work; hardware scrolling performance and exact macOS visual parity have not been established. Nested panels require distinct paint layers. Same-layer blurs and out-of-panel content still have draw-order limitations. Zeron’s dependency update is tracked in zeronsh/zeron#390 and retains its existing Windows theme policy.