gpu: Capturer::on_device and Renderer::report

A capturer on a device already open (the app's), and the renderer's
JSON shared by every reply.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo
This commit is contained in:
jyvikoandClaude Opus 5.5 authored and Irakli Kourtis committed 2026-10-16 08:27:21 -04:00
1 parent 7f0af28e9c
commit b655af305a
5 files changed
+18 -4

No files matched your search

+1 -4
View File
@@ -35,10 +35,7 @@ fn draw(f: &fieldcraft_engine::view::Framed, w: u32, h: u32) -> Result<(Vec<u8>,
/// the adapter, or why the CPU drew it), `results` (step, scale, contour), `undrawn_bodies` and
/// `sampled_symbols`. The MCP `screenshot` reply and `fieldcraft-cli snapshot` print it.
pub fn picture_report(r: &Renderer, shown: &Shown) -> Value {
let renderer = match r {
Renderer::Gpu { adapter, samples, .. } => json!({"kind": r.kind(), "adapter": adapter, "msaa": samples}),
Renderer::Cpu { why } => json!({"kind": r.kind(), "why": why}),
};
let renderer = r.report();
let contour = shown
.contour
.as_ref()