Cut macOS visualizer render cost - #27
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Greptile SummaryThis change reduces retained-canvas rendering overhead by caching registered-image fingerprints, drawing translucent solid rectangles directly with premultiplied Metal blending, adding paint-only immediate-command updates, and allowing apps to choose a default trace mode. The potential stale-secondary-window failure was disproved: the null-platform UI-shell test exercised a same-revision update initiated from a secondary window and confirmed that the primary canvas remains projected while the installed secondary window rebuilds with the updated model state. Confidence Score: 5/5The PR is safe to merge; no blocking failure remains. The cross-window retained-update behavior was exercised end to end on both the parent revision and this change, with the UI-shell test shard succeeding and the secondary retained tree reflecting the model update.
What T-Rex did
Reviews (3): Last reviewed commit: "Project updates onto the primary canvas" | Re-trigger Greptile |
What changed
Why
The Weaver audio visualizer was spending CPU in repeated image hashing, raster fallback, full view rebuilds, and per-frame event-journal writes. These changes remove those costs at the Native rendering/runtime seams without introducing a visualizer-specific primitive.
Impact
Canvas widgets with stable structure can update paint commands without re-running layout, semantics, or accessibility projection. Translucent flat rectangles remain on the GPU fast path. Ordinary Native applications retain their existing trace default unless they opt out.
Validation
zig build testzig build test-widget-profilezig build test-desktop-canvas-widgetzig build test-desktop-ui-shellzig build test-macos-shared-renderer-imageszig build -Doptimize=ReleaseFastzig build -Dtarget=x86_64-windows -Doptimize=ReleaseFast