refactor(new_editor): tighten app dependency boundaries

This commit is contained in:
2026-04-19 02:48:41 +08:00
parent 7429f22fb1
commit c59cd83c38
86 changed files with 1754 additions and 1077 deletions

View File

@@ -1,5 +1,7 @@
#include "Rendering/Viewport/ViewportRenderTargets.h"
#include "Host/ShaderResourceDescriptorAllocator.h"
namespace XCEngine::UI::Editor::App {
namespace {
@@ -111,7 +113,7 @@ bool CreateViewportSelectionMaskResources(
}
bool CreateViewportTextureDescriptor(
Host::D3D12ShaderResourceDescriptorAllocator& textureDescriptorAllocator,
Host::ShaderResourceDescriptorAllocator& textureDescriptorAllocator,
ViewportRenderTargets& targets) {
if (!textureDescriptorAllocator.CreateTextureDescriptor(
targets.colorTexture,
@@ -217,7 +219,7 @@ bool ViewportRenderTargetManager::EnsureTargets(
std::uint32_t width,
std::uint32_t height,
::XCEngine::RHI::RHIDevice& device,
Host::D3D12ShaderResourceDescriptorAllocator& textureDescriptorAllocator,
Host::ShaderResourceDescriptorAllocator& textureDescriptorAllocator,
ViewportRenderTargets& targets) const {
if (width == 0u || height == 0u) {
return false;
@@ -245,7 +247,7 @@ bool ViewportRenderTargetManager::EnsureTargets(
}
void ViewportRenderTargetManager::DestroyTargets(
Host::D3D12ShaderResourceDescriptorAllocator* textureDescriptorAllocator,
Host::ShaderResourceDescriptorAllocator* textureDescriptorAllocator,
ViewportRenderTargets& targets) const {
if (textureDescriptorAllocator != nullptr && targets.srvCpuHandle.ptr != 0) {
textureDescriptorAllocator->Free(targets.srvCpuHandle, targets.srvGpuHandle);