Drop stale T10 follow-up note in toplevel_export.rs
The T10 follow-up block (lines 561-575) said gbm_bo_map was a
documented follow-up. T10 is shipped (commit 0ba3c59, real pixel
read via runtime dlopen of libgbm.so.1); this comment block is now
stale and misleading.
Also fix the misleading "Public stub: where the gbm_bo_map read
belongs" docstring on read_pixels_via_gbm -- the function delegates
to the real implementation now, not a stub.
cargo test 98+/0; clippy clean.
This commit is contained in:
parent
0ba3c59cc1
commit
777256daab
@ -558,23 +558,10 @@ impl Dispatch<wl_buffer::WlBuffer, ()> for ExportState {
|
||||
}
|
||||
}
|
||||
|
||||
// ---- T10 follow-up note ----
|
||||
//
|
||||
// The actual `gbm_bo_map` (import dmabuf → gbm_bo → map → read pixels →
|
||||
// copy into a PNG-encoded buffer) is a documented follow-up. Wiring it
|
||||
// in is one new dep (`gbm` + `drm-fourcc` + a DRM device handle) plus a
|
||||
// ~50-line renderer that:
|
||||
// 1. opens /dev/dri/renderD128,
|
||||
// 2. creates a gbm_device,
|
||||
// 3. imports the dmabuf fd (we have it from the `object` event),
|
||||
// 4. gbm_bo_map(...) → *mut u8,
|
||||
// 5. reads stride*height bytes, swizzles into the PNG writer above.
|
||||
//
|
||||
// Until then `write_synthetic_frame` produces the right-sized, format-
|
||||
// labelled placeholder so callers can verify the wire path.
|
||||
|
||||
/// Public stub: where the gbm_bo_map read belongs. Kept as a function
|
||||
/// so the test below can assert its shape.
|
||||
/// Read the plane-0 dmabuf as an RGBA8 byte buffer and write a PNG
|
||||
/// of it to `dest`. This is the public entry point used by callers
|
||||
/// that want the raw pixels (the live `capture_toplevel` path goes
|
||||
/// through `write_pixels_via_gbm` instead).
|
||||
pub fn read_pixels_via_gbm(frame: &DmabufFrame, dest: &Path) -> anyhow::Result<Vec<u8>> {
|
||||
read_pixels_via_gbm_full(frame, dest)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user