Expand description
Camera-preview widget (P6) — a “dumb widget” owning a background capture
thread + a GL-texture ImageRef; no camera logic in core. Same RefAny-
dataset + merge-callback design as the map widget. See camera.rs.
Camera-preview widget - a “dumb widget” (like MapWidget)
that owns a background capture thread + a GL-texture ImageRef, with no
camera-specific logic in the core framework (SUPER_PLAN_2 §4 P6, widget
pivot - see the MASTER PLAN in MOBILE_SESSION_LOG.md).
CameraWidget::create(config).dom() -> a static <img> whose pixels a
background thread keeps fed. On AfterMount the capture thread starts
(CallbackInfo::add_thread); each frame goes through
[super::capture_common::present_frame], which uploads it into a stable
external GL texture + recomposites - no relayout, no display-list rebuild.
The shared thread/writeback/GL core lives in capture_common; this widget
is just its config + worker.
This tick uses a self-contained test-pattern worker (colour cycle, no platform deps); the real AVFoundation/Camera2 worker (dll-side) swaps in later.
Structs§
- Camera
Widget - A camera-preview widget.
create(config).dom()yields an<img>the capture thread keeps fed. - Camera
Widget State - Live state for one camera widget, carried across relayout by
[
merge_camera_state].