refactor(app): close ordered startup composition
This commit is contained in:
parent
54244d31f1
commit
530b4bd8f5
16 changed files with 537 additions and 215 deletions
|
|
@ -127,6 +127,7 @@ internal sealed class FrameRootRuntimeBindings : IDisposable
|
|||
|
||||
internal sealed class FrameRootCompositionPhase
|
||||
: IFrameRootCompositionPhase<
|
||||
GameWindowPlatformResult<GL, IInputContext>,
|
||||
HostInputCameraResult,
|
||||
ContentEffectsAudioResult,
|
||||
SettingsDevToolsResult,
|
||||
|
|
@ -153,6 +154,7 @@ internal sealed class FrameRootCompositionPhase
|
|||
}
|
||||
|
||||
public FrameRootResult Compose(
|
||||
GameWindowPlatformResult<GL, IInputContext> platform,
|
||||
HostInputCameraResult host,
|
||||
ContentEffectsAudioResult content,
|
||||
SettingsDevToolsResult settings,
|
||||
|
|
@ -161,6 +163,7 @@ internal sealed class FrameRootCompositionPhase
|
|||
LivePresentationResult live,
|
||||
SessionPlayerResult session)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(platform);
|
||||
ArgumentNullException.ThrowIfNull(host);
|
||||
ArgumentNullException.ThrowIfNull(content);
|
||||
ArgumentNullException.ThrowIfNull(settings);
|
||||
|
|
@ -168,6 +171,12 @@ internal sealed class FrameRootCompositionPhase
|
|||
ArgumentNullException.ThrowIfNull(interaction);
|
||||
ArgumentNullException.ThrowIfNull(live);
|
||||
ArgumentNullException.ThrowIfNull(session);
|
||||
if (!ReferenceEquals(_dependencies.Gl, platform.Graphics)
|
||||
|| !ReferenceEquals(_dependencies.Input, platform.Input))
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Frame-root dependencies do not match the ordered platform result.");
|
||||
}
|
||||
|
||||
var scope = new CompositionAcquisitionScope();
|
||||
FrameRootRuntimeBindings? bindings = null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue