Finished phase 1
This commit is contained in:
@@ -8,13 +8,13 @@ The goal of `RuntimeSnapshotProvider` is to separate render-facing state publica
|
||||
|
||||
`RuntimeSnapshotProvider` is the boundary between runtime-owned state and render-consumable state.
|
||||
|
||||
It exists to solve three current problems:
|
||||
It exists to solve three problems that Phase 1 pulled apart:
|
||||
|
||||
- render state is still built directly out of `RuntimeHost` under a shared mutex
|
||||
- render reads and refreshes partially mutable cached layer state in more than one place
|
||||
- render state was built directly out of `RuntimeHost` under a shared mutex
|
||||
- render read and refreshed partially mutable cached layer state in more than one place
|
||||
- state publication, state versioning, and dynamic frame-field refresh need explicit ownership
|
||||
|
||||
Today the closest current behavior lives in:
|
||||
Before the Phase 1 runtime split, the closest behavior lived in:
|
||||
|
||||
- `RuntimeHost::GetLayerRenderStates(...)`
|
||||
- `RuntimeHost::TryGetLayerRenderStates(...)`
|
||||
@@ -340,7 +340,7 @@ This is especially important while migrating away from the current lock/fallback
|
||||
|
||||
## Current Code Mapping
|
||||
|
||||
The current code suggests the following migration map.
|
||||
The current code follows this migration map.
|
||||
|
||||
### Move into `RenderSnapshotBuilder`
|
||||
|
||||
@@ -370,12 +370,12 @@ Current methods that should become compatibility shims and later disappear:
|
||||
|
||||
The previous `OpenGLComposite` cache path:
|
||||
|
||||
- reads versions from `RuntimeHost`/store-owned counters
|
||||
- read versions from `RuntimeHost`/store-owned counters
|
||||
- conditionally calls `TryRefreshCachedLayerStates(...)`
|
||||
- conditionally rebuilds full layer state
|
||||
- then reapplies render-local OSC overlay state
|
||||
|
||||
During migration, that should become:
|
||||
The migrated runtime path is:
|
||||
|
||||
1. get latest published snapshot from provider
|
||||
2. compare snapshot versions produced by `RenderSnapshotBuilder`
|
||||
@@ -390,12 +390,12 @@ That is a much cleaner split than the current mixed lock/cache/fallback flow in
|
||||
### Step 1: Introduce provider types without changing behavior
|
||||
|
||||
- define `RuntimeRenderSnapshot`, `RuntimeRenderLayerSnapshot`, and `RuntimeRenderFrameContext`
|
||||
- implement provider methods as thin wrappers over current `RuntimeHost` logic
|
||||
- keep `RuntimeHost` as the backing source temporarily
|
||||
- initially implement provider methods as thin wrappers over existing behavior
|
||||
- completed: replace the temporary `RuntimeHost` backing source with `RenderSnapshotBuilder`
|
||||
|
||||
### Step 2: Route render reads through the provider
|
||||
|
||||
- replace direct `RuntimeHost` layer-state reads with provider snapshot reads
|
||||
- replace direct host/store layer-state reads with provider snapshot reads
|
||||
- preserve current version behavior first, even if internally bridged to existing counters
|
||||
|
||||
### Step 3: Separate structural publication from frame context
|
||||
@@ -479,7 +479,7 @@ Recommended tests:
|
||||
|
||||
`RuntimeSnapshotProvider` can be considered architecturally in place once:
|
||||
|
||||
- render no longer reads `RuntimeStore` or `RuntimeHost` render state directly
|
||||
- render no longer reads `RuntimeStore` or legacy host render state directly
|
||||
- render consumes published snapshot handles rather than rebuilding layer vectors from host state
|
||||
- dynamic frame fields are supplied separately from structural snapshot publication
|
||||
- snapshot version domains are explicit and observable
|
||||
@@ -497,4 +497,4 @@ Its contract is:
|
||||
- keep frame-local timing separate
|
||||
- give render a cheap, lock-light read path
|
||||
|
||||
If that boundary is held, later phases can split `RuntimeHost`, isolate render timing, and decouple playout without inventing a second render-state authority.
|
||||
If that boundary is held, later phases can isolate render timing and decouple playout without inventing a second render-state authority.
|
||||
|
||||
Reference in New Issue
Block a user