toplevel_export: capture_via_export docstring contradiction (Grok round 3 #11)

The docstring simultaneously claimed the function writes a synthetic
PNG-sized byte slice and that a real pixel read runs end-to-end via
gbm_runtime. Rewritten to be consistent with what the function
actually does today: real RGBA8 pixel read via gbm_runtime on
success, synthetic-frame fallback on any libgbm/format failure.

cargo test 99+/0; clippy clean.
This commit is contained in:
en 2026-09-16 17:33:25 +02:00
parent 0906e86594
commit 60385d062a

View File

@ -218,14 +218,12 @@ pub async fn capture_via_export_for(
capture_with_state(conn, manager, output, dest, event_queue).await
}
/// Public entry: the dmabuf path of `capture_toplevel`. Connects to
/// Public entry: the dmabuf path of capture_toplevel. Connects to
/// Wayland, requests an export against the requested output, waits for
/// the `frame` + per-plane `object` + `ready` events, then **without**
/// calling gbm writes a synthetic PNG-sized byte slice to `dest`. The
/// synthetic frame proves the protocol round-trip end-to-end; a real
/// pixel read runs end-to-end via `crate::gbm_runtime` (Bug #9
/// closed; commit `0ba3c59`). On any libgbm/format failure the
/// synthetic-frame fallback runs.
/// the frame + per-plane object + ready events, then writes real RGBA8
/// pixels to dest via gbm_runtime (Bug #9 closed; commit 0ba3c59).
/// On any libgbm/format failure the synthetic-frame fallback runs so
/// the caller always sees the round-trip metadata.
pub async fn capture_via_export(
output: &wl_output::WlOutput,
dest: &Path,