HTTP boundry
This commit is contained in:
@@ -34,7 +34,8 @@ Primary source areas:
|
||||
- `src/runtime/shader`: background Slang build bridge and prepared shader artifact types
|
||||
- `src/runtime/state`: runtime JSON helpers, parameter normalization, and debounced runtime-state persistence
|
||||
- `src/runtime/text`: MSDF/MTSDF font atlas build and CPU-side prepared text texture composition
|
||||
- `src/control`: HTTP routing, command parsing, OpenAPI state JSON
|
||||
- `src/control`: command parsing, HTTP/WebSocket transport helpers, OpenAPI state JSON
|
||||
- `src/app/RenderCadenceHttpRoutes.*`: this app's current HTTP endpoint map
|
||||
- `src/preview`: optional non-consuming preview window
|
||||
- `src/telemetry` and `src/logging`: runtime observation and logging
|
||||
|
||||
@@ -149,7 +150,7 @@ Screenshot routes are present in the UI/OpenAPI surface but are not implemented
|
||||
|
||||
## Control Surface
|
||||
|
||||
The HTTP server runs on its own thread. It serves:
|
||||
The HTTP server runs on its own thread. `HttpControlServer` owns socket lifetime, HTTP parsing, static asset helpers, OpenAPI/Swagger helper serving, and WebSocket state transport. `RenderCadenceHttpRoutes` owns this app's current endpoint map:
|
||||
|
||||
- UI assets
|
||||
- OpenAPI/Swagger docs
|
||||
@@ -167,6 +168,8 @@ Known but not implemented in the current native command path:
|
||||
|
||||
Unsupported routes return an action response with `ok: false`.
|
||||
|
||||
Forks can reuse the HTTP/WebSocket shell without keeping these endpoints by installing a different route callback.
|
||||
|
||||
## Tests
|
||||
|
||||
Native tests cover the main non-GL contracts:
|
||||
@@ -177,7 +180,7 @@ Native tests cover the main non-GL contracts:
|
||||
- supported shader catalog
|
||||
- runtime layer restore/reload behavior
|
||||
- runtime-state persistence writer
|
||||
- HTTP command parsing
|
||||
- HTTP transport and app-route dispatch
|
||||
- frame exchange and input mailbox behavior
|
||||
- video format and scheduling helpers
|
||||
|
||||
|
||||
@@ -21,7 +21,8 @@ These parts are the useful base for the fork:
|
||||
- `src/render/readback`: BGRA8/UYVY8 PBO readback and completed-frame publication.
|
||||
- `src/platform`: hidden GL window/context support.
|
||||
- `src/app`: startup, config, video backend factory, runtime layer orchestration, preview, telemetry, and HTTP server hookup.
|
||||
- `src/control`, `src/telemetry`, `src/logging`, and `ui`: useful if the new repo still wants a local control surface.
|
||||
- `src/control/http`, `src/telemetry`, `src/logging`, and `ui`: useful if the new repo still wants a local control surface.
|
||||
- `src/app/RenderCadenceHttpRoutes.*`: useful only if the new repo keeps this app's current `/api/...` control surface.
|
||||
|
||||
## Replace Or Rework
|
||||
|
||||
@@ -32,10 +33,13 @@ These are most likely to change when the fork renders something other than shade
|
||||
- `src/shader`: shader package manifest parsing and Slang wrapper generation, unless the new renderer keeps the same shader package contract.
|
||||
- `shaders/`: bundled shader package library.
|
||||
- `runtime/templates/shader_wrapper.slang.in`: only needed for the current Slang package pipeline.
|
||||
- `src/app/RenderCadenceHttpRoutes.*`: replace this with a fork-owned route module if the new renderer has different controls, while keeping `src/control/http/HttpControlServer.*` as the socket/static/WebSocket shell.
|
||||
- Shader-specific UI affordances in `ui`, if the new renderer has a different control model.
|
||||
|
||||
The first fork step is now in place: `RenderThread` preserves the cadence/readback shell and calls a narrow render-content interface behind the draw call. A new repo can swap that implementation without touching video I/O scheduling.
|
||||
|
||||
The HTTP control boundary is also split now. `HttpControlServer` owns transport, static-file helpers, OpenAPI helper serving, and WebSocket state transport; `RenderCadenceHttpRoutes` owns this app's REST endpoint map. A fork that wants the same browser/server plumbing can provide its own route callback and leave the Render Cadence-specific endpoints behind.
|
||||
|
||||
## Current Swap Point
|
||||
|
||||
The render cadence loop now calls `IRenderContent` inside the readback queue call in `src/render/thread/RenderThread.cpp`:
|
||||
|
||||
Reference in New Issue
Block a user