Refactor editor rendering contracts
This commit is contained in:
@@ -18,7 +18,7 @@ bool IsViewportPanel(std::string_view panelId) {
|
||||
}
|
||||
|
||||
void ApplyViewportFrameToPresentation(
|
||||
const ViewportFrame& viewportFrame,
|
||||
const EditorViewportFrame& viewportFrame,
|
||||
UIEditorWorkspacePanelPresentationModel& presentation) {
|
||||
presentation.viewportShellModel.frame.texture = viewportFrame.texture;
|
||||
presentation.viewportShellModel.frame.requestedSize = viewportFrame.requestedSize;
|
||||
@@ -28,7 +28,7 @@ void ApplyViewportFrameToPresentation(
|
||||
}
|
||||
|
||||
void ApplyViewportFrameToShellModel(
|
||||
const ViewportFrame& viewportFrame,
|
||||
const EditorViewportFrame& viewportFrame,
|
||||
UIEditorViewportShellModel& shellModel) {
|
||||
shellModel.frame.texture = viewportFrame.texture;
|
||||
shellModel.frame.requestedSize = viewportFrame.requestedSize;
|
||||
@@ -51,7 +51,7 @@ UIEditorWorkspacePanelPresentationModel* FindMutableWorkspacePresentation(
|
||||
|
||||
void ApplyViewportFramesToShellFrame(
|
||||
UIEditorShellInteractionFrame& shellFrame,
|
||||
ViewportHostService& viewportHostService) {
|
||||
EditorViewportRuntimeServices& viewportRuntimeServices) {
|
||||
auto applyToViewportFrames =
|
||||
[&](std::vector<UIEditorWorkspaceViewportComposeFrame>& viewportFrames) {
|
||||
for (UIEditorWorkspaceViewportComposeFrame& viewportComposeFrame : viewportFrames) {
|
||||
@@ -59,8 +59,8 @@ void ApplyViewportFramesToShellFrame(
|
||||
continue;
|
||||
}
|
||||
|
||||
const ViewportFrame viewportFrame =
|
||||
viewportHostService.RequestViewport(
|
||||
const EditorViewportFrame viewportFrame =
|
||||
viewportRuntimeServices.RequestViewport(
|
||||
viewportComposeFrame.panelId,
|
||||
viewportComposeFrame.viewportShellFrame.requestedViewportSize);
|
||||
ApplyViewportFrameToShellModel(
|
||||
@@ -128,7 +128,7 @@ void EditorShellInteractionEngine::Update(
|
||||
const Widgets::UIEditorDockHostLayout preUpdateDockLayout =
|
||||
context.shellFrame.workspaceInteractionFrame.dockHostFrame.layout;
|
||||
|
||||
context.viewportHostService.BeginFrame();
|
||||
context.viewportRuntimeServices.BeginFrame();
|
||||
const std::vector<UIInputEvent> shellEvents =
|
||||
context.hostedContentCaptureActive
|
||||
? FilterShellInputEventsForHostedContentCapture(context.inputEvents)
|
||||
@@ -160,7 +160,7 @@ void EditorShellInteractionEngine::Update(
|
||||
metrics);
|
||||
}
|
||||
|
||||
ApplyViewportFramesToShellFrame(context.shellFrame, context.viewportHostService);
|
||||
ApplyViewportFramesToShellFrame(context.shellFrame, context.viewportRuntimeServices);
|
||||
}
|
||||
|
||||
} // namespace XCEngine::UI::Editor::App
|
||||
|
||||
Reference in New Issue
Block a user