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

@@ -4,6 +4,8 @@
#define NOMINMAX
#endif
#include "Host/TextureHost.h"
#include <Rendering/D3D12/D3D12WindowInteropContext.h>
#include <Rendering/D3D12/D3D12WindowRenderer.h>
@@ -29,7 +31,9 @@
namespace XCEngine::UI::Editor::Host {
class NativeRenderer : public ::XCEngine::UI::Editor::UIEditorTextMeasurer {
class NativeRenderer
: public TextureHost
, public ::XCEngine::UI::Editor::UIEditorTextMeasurer {
public:
bool Initialize(HWND hwnd);
void Shutdown();
@@ -47,13 +51,13 @@ public:
bool LoadTextureFromFile(
const std::filesystem::path& path,
::XCEngine::UI::UITextureHandle& outTexture,
std::string& outError);
std::string& outError) override;
bool LoadTextureFromMemory(
const std::uint8_t* data,
std::size_t size,
::XCEngine::UI::UITextureHandle& outTexture,
std::string& outError);
void ReleaseTexture(::XCEngine::UI::UITextureHandle& texture);
std::string& outError) override;
void ReleaseTexture(::XCEngine::UI::UITextureHandle& texture) override;
float MeasureTextWidth(
const ::XCEngine::UI::Editor::UIEditorTextMeasureRequest& request) const override;
bool CaptureToPng(