Report depth export snapshot routing
This commit is contained in:
@@ -864,9 +864,11 @@ powershell -ExecutionPolicy Bypass -File scripts\automation\apple-remote-build.p
|
||||
that decides whether payload-complete document snapshots use pure
|
||||
document/renderer export writers or retained legacy exporters, including
|
||||
PNG/JPEG equirectangular target support, collection/cube target support,
|
||||
platform unsupported, and pending renderer-readback fallback reasons. The
|
||||
live retained export bridge consumes the same current-platform support helper
|
||||
for snapshot-writer attempts instead of carrying local Web writer gates.
|
||||
depth unsupported-target fallback, platform unsupported, and pending
|
||||
renderer-readback fallback reasons. The live retained export bridge consumes
|
||||
the same current-platform support helper for snapshot-writer attempts instead
|
||||
of carrying local Web writer gates, and depth export logs that route fallback
|
||||
before retained depth rendering.
|
||||
- `pano_cli plan-export-start` exposes `pp_app_core` export availability
|
||||
planning for license-gated, demo-blocked, and missing-canvas states as JSON;
|
||||
the live image, layer, animation-frame, depth, and cube-face export dialogs
|
||||
|
||||
@@ -599,6 +599,13 @@ agent or engineer to remove them without reconstructing context from chat.
|
||||
smoke coverage for unsupported-platform fallback. Retained Web prepared-file
|
||||
handoff, incomplete-readback collection fallback, depth/video export
|
||||
execution, and broader renderer-owned export execution remain open.
|
||||
- 2026-06-06: DEBT-0010/DEBT-0043 were narrowed again. Depth export now logs
|
||||
the same tested `pp_app_core` document-snapshot route fallback as an
|
||||
unsupported writer target before retained depth rendering, and
|
||||
`pano_cli plan-export-snapshot-route --kind depth` has smoke coverage for the
|
||||
unsupported-target JSON contract. The actual depth perspective render,
|
||||
depth-payload readback, write execution, progress/threading parity, and
|
||||
retained Web handoff remain open.
|
||||
- 2026-06-05: DEBT-0010/DEBT-0036/DEBT-0043 were narrowed again.
|
||||
`pp_paint_renderer` now exports independent layer equirectangular PNGs and
|
||||
merged animation-frame equirectangular PNGs from payload-complete
|
||||
|
||||
@@ -740,10 +740,11 @@ local Web writer gates.
|
||||
Web handoff, video, depth writer replacement, and incomplete-readback cases
|
||||
still delegate to retained `Canvas` writers after route/readiness reporting.
|
||||
Depth export now also plans the retained image/depth file targets in
|
||||
`pp_app_core` and logs a `pp_paint_renderer` document depth render plan for the
|
||||
legacy 1024x1024 perspective render plus per-layer depth pass before falling
|
||||
back to retained `Canvas::export_depth`; actual depth rendering, readback, and
|
||||
format parity remain retained.
|
||||
`pp_app_core`, logs the document-snapshot route fallback as an unsupported
|
||||
snapshot-writer target, and logs a `pp_paint_renderer` document depth render
|
||||
plan for the legacy 1024x1024 perspective render plus per-layer depth pass
|
||||
before falling back to retained `Canvas::export_depth`; actual depth rendering,
|
||||
readback, and format parity remain retained.
|
||||
`pano_cli plan-image-import` exposes app-core planning for File > Import image
|
||||
route decisions, including wide equirectangular images, legacy vertical cube
|
||||
strips, regular transform-placement images, and invalid image dimensions; live
|
||||
|
||||
@@ -144,17 +144,6 @@ pp::foundation::Result<LegacyDocumentExportSnapshotReports> prepare_legacy_docum
|
||||
return pp::foundation::Result<LegacyDocumentExportSnapshotReports>::success(std::move(reports));
|
||||
}
|
||||
|
||||
void prepare_legacy_document_export_snapshot_or_continue(App& app, const char* context)
|
||||
{
|
||||
const auto prepared = prepare_legacy_document_export_snapshot(app, context);
|
||||
if (!prepared) {
|
||||
LOG(
|
||||
"%s document export snapshot bridge retained legacy export after failure: %s",
|
||||
context,
|
||||
prepared.status().message);
|
||||
}
|
||||
}
|
||||
|
||||
bool should_use_document_snapshot_writer(
|
||||
const char* context,
|
||||
pp::app::DocumentExportExecutionKind kind,
|
||||
@@ -563,7 +552,6 @@ public:
|
||||
void export_depth(std::string_view document_name) override
|
||||
{
|
||||
auto* app = &app_;
|
||||
#if !__WEB__
|
||||
const auto target = pp::app::make_document_depth_export_target(app_.work_path, document_name);
|
||||
if (target) {
|
||||
LOG(
|
||||
@@ -576,6 +564,17 @@ public:
|
||||
|
||||
const auto prepared = prepare_legacy_document_export_snapshot(app_, "export-depth");
|
||||
if (prepared) {
|
||||
const auto report = pp::app::make_document_canvas_save_snapshot_report(prepared.value().snapshot);
|
||||
const auto route = pp::app::plan_document_export_snapshot_route_for_current_platform(
|
||||
pp::app::DocumentExportExecutionKind::depth,
|
||||
report);
|
||||
if (!route.uses_document_snapshot_writer) {
|
||||
LOG(
|
||||
"export-depth document export writer retained legacy export: %.*s",
|
||||
static_cast<int>(route.fallback_reason.size()),
|
||||
route.fallback_reason.data());
|
||||
}
|
||||
#if !__WEB__
|
||||
const auto plan = pp::paint_renderer::plan_document_depth_export_render(
|
||||
pp::paint_renderer::DocumentDepthExportRenderPlanRequest {
|
||||
.document = &prepared.value().snapshot.document,
|
||||
@@ -597,14 +596,12 @@ public:
|
||||
"export-depth document export render plan retained legacy export after failure: %s",
|
||||
plan.status().message);
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
LOG(
|
||||
"export-depth document export snapshot bridge retained legacy export after failure: %s",
|
||||
prepared.status().message);
|
||||
}
|
||||
#else
|
||||
prepare_legacy_document_export_snapshot_or_continue(app_, "export-depth");
|
||||
#endif
|
||||
app_.canvas->m_canvas->export_depth(std::string(document_name), [app] {
|
||||
show_export_success_dialog(
|
||||
*app,
|
||||
|
||||
@@ -901,10 +901,10 @@ if(TARGET pano_cli)
|
||||
PASS_REGULAR_EXPRESSION "\"command\":\"plan-export-menu\".*\"kind\":\"layers\".*\"hasCanvas\":false.*\"action\":\"unavailable-no-canvas\".*\"opensDialog\":false")
|
||||
|
||||
add_test(NAME pano_cli_plan_export_snapshot_route_ready_smoke
|
||||
COMMAND pano_cli plan-export-snapshot-route --kind equirectangular --captured-face-payloads 6 --pending-face-payloads 6)
|
||||
COMMAND pano_cli plan-export-snapshot-route --kind equirectangular --target-path D:/Paint/demo.png --captured-face-payloads 6 --pending-face-payloads 6)
|
||||
set_tests_properties(pano_cli_plan_export_snapshot_route_ready_smoke PROPERTIES
|
||||
LABELS "app;integration;desktop-fast"
|
||||
PASS_REGULAR_EXPRESSION "\"command\":\"plan-export-snapshot-route\".*\"kind\":\"equirectangular\".*\"payloadComplete\":true.*\"action\":\"use-document-snapshot-writer\".*\"usesDocumentSnapshotWriter\":true.*\"fallbackReason\":\"\"")
|
||||
PASS_REGULAR_EXPRESSION "\"command\":\"plan-export-snapshot-route\".*\"kind\":\"equirectangular\".*\"targetPath\":\"D:/Paint/demo.png\".*\"payloadComplete\":true.*\"action\":\"use-document-snapshot-writer\".*\"usesDocumentSnapshotWriter\":true.*\"fallbackReason\":\"\"")
|
||||
|
||||
add_test(NAME pano_cli_plan_export_snapshot_route_pending_smoke
|
||||
COMMAND pano_cli plan-export-snapshot-route --kind layers-collection --captured-face-payloads 3 --pending-face-payloads 6)
|
||||
@@ -924,6 +924,12 @@ if(TARGET pano_cli)
|
||||
LABELS "app;integration;desktop-fast"
|
||||
PASS_REGULAR_EXPRESSION "\"command\":\"plan-export-snapshot-route\".*\"kind\":\"cube-faces\".*\"targetSupported\":true.*\"platformSupported\":false.*\"action\":\"use-legacy-export\".*\"fallbackReason\":\"document snapshot export is disabled on this platform\"")
|
||||
|
||||
add_test(NAME pano_cli_plan_export_snapshot_route_depth_smoke
|
||||
COMMAND pano_cli plan-export-snapshot-route --kind depth)
|
||||
set_tests_properties(pano_cli_plan_export_snapshot_route_depth_smoke PROPERTIES
|
||||
LABELS "app;integration;desktop-fast"
|
||||
PASS_REGULAR_EXPRESSION "\"command\":\"plan-export-snapshot-route\".*\"kind\":\"depth\".*\"targetSupported\":false.*\"platformSupported\":true.*\"action\":\"use-legacy-export\".*\"fallbackReason\":\"document snapshot export does not support this target\"")
|
||||
|
||||
add_test(NAME pano_cli_plan_export_menu_rejects_unknown
|
||||
COMMAND pano_cli plan-export-menu --kind unknown)
|
||||
set_tests_properties(pano_cli_plan_export_menu_rejects_unknown PROPERTIES
|
||||
|
||||
@@ -852,6 +852,31 @@ void export_snapshot_route_for_current_platform_uses_platform_policy(pp::tests::
|
||||
#endif
|
||||
}
|
||||
|
||||
void export_snapshot_route_for_current_platform_reports_depth_fallback(pp::tests::Harness& harness)
|
||||
{
|
||||
pp::app::DocumentCanvasSaveSnapshotReport report;
|
||||
report.payload_complete = true;
|
||||
report.can_export_ppi = true;
|
||||
|
||||
const auto plan = pp::app::plan_document_export_snapshot_route_for_current_platform(
|
||||
pp::app::DocumentExportExecutionKind::depth,
|
||||
report);
|
||||
|
||||
PP_EXPECT(harness, !plan.uses_document_snapshot_writer);
|
||||
#if __WEB__
|
||||
PP_EXPECT(harness, !plan.platform_supported);
|
||||
PP_EXPECT(
|
||||
harness,
|
||||
plan.fallback_reason == "document snapshot export is disabled on this platform");
|
||||
#else
|
||||
PP_EXPECT(harness, plan.platform_supported);
|
||||
PP_EXPECT(harness, !plan.target_supported);
|
||||
PP_EXPECT(
|
||||
harness,
|
||||
plan.fallback_reason == "document snapshot export does not support this target");
|
||||
#endif
|
||||
}
|
||||
|
||||
void export_snapshot_route_falls_back_for_pending_renderer_payloads(pp::tests::Harness& harness)
|
||||
{
|
||||
pp::app::DocumentCanvasSaveSnapshotReport report;
|
||||
@@ -1273,6 +1298,9 @@ int main()
|
||||
harness.run(
|
||||
"export snapshot route for current platform uses platform policy",
|
||||
export_snapshot_route_for_current_platform_uses_platform_policy);
|
||||
harness.run(
|
||||
"export snapshot route for current platform reports depth fallback",
|
||||
export_snapshot_route_for_current_platform_reports_depth_fallback);
|
||||
harness.run(
|
||||
"export snapshot route falls back for pending renderer payloads",
|
||||
export_snapshot_route_falls_back_for_pending_renderer_payloads);
|
||||
|
||||
@@ -3905,8 +3905,7 @@ int plan_export_snapshot_route(int argc, char** argv)
|
||||
report.can_export_ppi = report.payload_complete;
|
||||
|
||||
const bool target_supported = args.target_supported
|
||||
&& (args.target_path.empty()
|
||||
|| pp::app::document_export_snapshot_target_supported(kind.value(), args.target_path));
|
||||
&& pp::app::document_export_snapshot_target_supported(kind.value(), args.target_path);
|
||||
const auto plan = pp::app::plan_document_export_snapshot_route(
|
||||
kind.value(),
|
||||
report,
|
||||
|
||||
Reference in New Issue
Block a user