Route live save snapshots through PPI policy

This commit is contained in:
2026-06-06 11:43:50 +02:00
parent 772dc7332b
commit 9d9b93abb1
8 changed files with 148 additions and 23 deletions

View File

@@ -40,6 +40,32 @@ pp::foundation::Status prepare_legacy_document_save_snapshot(App& app, const cha
const auto report = pp::app::make_document_canvas_save_snapshot_report(snapshot.value());
log_legacy_document_save_snapshot(context, report);
const auto route = pp::app::plan_document_canvas_save_writer_route(report);
if (!route.uses_document_ppi_writer) {
LOG(
"%s document save writer retained legacy save: %.*s",
context,
static_cast<int>(route.fallback_reason.size()),
route.fallback_reason.data());
return pp::foundation::Status::success();
}
const auto exported = pp::app::export_document_canvas_save_snapshot_to_ppi(snapshot.value());
if (!exported) {
LOG(
"%s document save writer retained legacy save after PPI export failure: %s",
context,
exported.status().message);
return exported.status();
}
LOG(
"%s document save writer route: document-ppi payloadComplete=%s bytes=%llu capturedFaces=%zu pendingFaces=%zu",
context,
exported.value().report.payload_complete ? "true" : "false",
static_cast<unsigned long long>(exported.value().bytes.size()),
exported.value().report.captured_face_payloads,
exported.value().report.pending_face_payloads);
return pp::foundation::Status::success();
}