Files
oak-gpui/crates/gpui_widgets/Cargo.toml
T
Mike-Solar d97e3abd20 feat(gpui): support BGRA surfaces on macOS; add W4 viewer widget
Two changes landing W4 of the oak task list:

gpui_macos: the Surface renderer only accepted biplanar YUV 4:2:0 pixel
buffers, so engine BGRA frames could not be displayed. SurfaceBounds gains an
is_bgra flag and draw_surfaces now creates a single BGRA8Unorm texture (and
the fragment shader swizzles it to RGBA) for 32BGRA buffers, keeping the
YUV path unchanged. Verified by running the W3 surface_bridge demo.

gpui_widgets::viewer: ViewerWidget with a pure TransportState machine
(advance/loop/step/in-out, unit-tested), a PlaybackClock trait the host
implements over the engine, a ~60Hz polling ticker, a transport bar emitting
ViewerEvent requests, timecode via gpui::timeline::time, and safe-frame/zoom
toggles. examples/viewer.rs shows a mock clock with generated macOS test
frames. 87 widget + 182 gpui tests pass.
2026-08-09 06:05:54 +08:00

37 lines
827 B
TOML

[package]
name = "gpui_widgets"
version = "0.1.0"
edition.workspace = true
authors = ["Oak <oak@users.noreply.github.com>"]
description = "Form controls, menus, dialogs and NLE widgets built on gpui"
publish = true
license = "Apache-2.0"
[lints]
workspace = true
[dependencies]
anyhow.workspace = true
gpui.workspace = true
gpui_elements = { path = "../gpui_elements" }
thiserror.workspace = true
[dev-dependencies]
gpui = { workspace = true, features = ["test-support"] }
gpui_platform = { workspace = true, features = ["font-kit", "wayland", "x11"] }
[target.'cfg(target_os = "macos")'.dev-dependencies]
core-video.workspace = true
[[example]]
name = "controls"
path = "examples/controls.rs"
[[example]]
name = "menus_dialogs"
path = "examples/menus_dialogs.rs"
[[example]]
name = "viewer"
path = "examples/viewer.rs"