Screen share 6: wgpu video widget (spike → production) #153

Closed
opened 2026-11-12 02:06:54 +00:00 by charles · 0 comments
Owner

Files:

  • Create: crates/fluxer-ui/src/widgets/video.rs, crates/fluxer-ui/src/widgets/video.wgsl, crates/fluxer-ui/tests/video_widget.rs (#![cfg(not(windows))])
  • Modify: crates/fluxer-ui/{Cargo.toml,README.md,src/widgets/mod.rs} (depend on fluxer-video), CLAUDE.md (crate rules: the FrameBus exception, worded like the image one), docs/superpowers/research/2026-11-11-screenshare-spikes.md (§4)
  • Test: as above + screenshot video_widget_pattern

Interfaces:

  • Produces: widgets::video::video(bus: &FrameBus, key: VideoKey, fit: Fit) -> Element<'_, M> with Fit::{Contain, Cover}; wgpu path = iced shader widget, three R8Unorm textures re-uploaded only when the bus generation changed, BT.601 limited-range shader, letterbox in VOICE_SURFACE_0; tiny-skia fallback = fluxer-video RGBA downscaled to the widget size via image::Handle::from_rgba; widgets::video::redraw_subscription(bus, keys) -> Subscription<()> (window frames, emits only when a key's generation moved).

  • Spike part: spikes §4: frame time of uploading 1080p I420 per frame on lavapipe and on a real GPU, whether the shader primitive renders in testing::offscreen::render, and memory per key.

  • Step 1: Write failing tests: uploads_only_on_new_generation (counting pipeline hook), contain_letterboxes_and_cover_crops, missing_key_draws_surface, fallback_matches_wgpu_within_tolerance (both paths render the pattern; mean error bound); screenshot video_widget_pattern.

  • Step 2–5: FAIL → implement → PASS → commit feat(ui): wgpu video widget.

Depends on: Screen share 1 (#148)

Plan: https://git.forked.io/charles/fluxer-native/src/branch/main/docs/superpowers/plans/2026-11-11-screenshare.md
Spec: https://git.forked.io/charles/fluxer-native/src/branch/main/docs/superpowers/specs/2026-11-11-fluxer-native-screenshare-design.md

**Files:** - Create: `crates/fluxer-ui/src/widgets/video.rs`, `crates/fluxer-ui/src/widgets/video.wgsl`, `crates/fluxer-ui/tests/video_widget.rs` (`#![cfg(not(windows))]`) - Modify: `crates/fluxer-ui/{Cargo.toml,README.md,src/widgets/mod.rs}` (depend on `fluxer-video`), `CLAUDE.md` (crate rules: the `FrameBus` exception, worded like the image one), `docs/superpowers/research/2026-11-11-screenshare-spikes.md` (§4) - Test: as above + screenshot `video_widget_pattern` **Interfaces:** - Produces: `widgets::video::video(bus: &FrameBus, key: VideoKey, fit: Fit) -> Element<'_, M>` with `Fit::{Contain, Cover}`; wgpu path = iced `shader` widget, three `R8Unorm` textures re-uploaded only when the bus generation changed, BT.601 limited-range shader, letterbox in `VOICE_SURFACE_0`; tiny-skia fallback = `fluxer-video` RGBA downscaled to the widget size via `image::Handle::from_rgba`; `widgets::video::redraw_subscription(bus, keys) -> Subscription<()>` (window frames, emits only when a key's generation moved). - Spike part: *spikes §4*: frame time of uploading 1080p I420 per frame on lavapipe and on a real GPU, whether the `shader` primitive renders in `testing::offscreen::render`, and memory per key. - [ ] **Step 1: Write failing tests**: `uploads_only_on_new_generation` (counting pipeline hook), `contain_letterboxes_and_cover_crops`, `missing_key_draws_surface`, `fallback_matches_wgpu_within_tolerance` (both paths render the pattern; mean error bound); screenshot `video_widget_pattern`. - [ ] **Step 2–5:** FAIL → implement → PASS → commit `feat(ui): wgpu video widget`. Depends on: Screen share 1 (#148) Plan: https://git.forked.io/charles/fluxer-native/src/branch/main/docs/superpowers/plans/2026-11-11-screenshare.md Spec: https://git.forked.io/charles/fluxer-native/src/branch/main/docs/superpowers/specs/2026-11-11-fluxer-native-screenshare-design.md
charles added this to the Screen share milestone 2026-11-12 02:06:54 +00:00
charles referenced this issue from a commit 2026-11-12 03:09:46 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/fluxer-native#153
No description provided.