Remove backend probing from XCUI panel canvas host

This commit is contained in:
2026-04-05 17:03:02 +08:00
parent 94482ab98c
commit 3968083da7
11 changed files with 15 additions and 101 deletions

View File

@@ -12,7 +12,6 @@ using XCEngine::Editor::XCUIBackend::CreateLegacyImGuiHostedPreviewPresenter;
using XCEngine::Editor::XCUIBackend::CreateLegacyImGuiPanelCanvasHost;
using XCEngine::Editor::XCUIBackend::CreateLegacyImGuiWindowUICompositor;
using XCEngine::Editor::XCUIBackend::RenderLegacyImGuiDemoWindow;
using XCEngine::Editor::XCUIBackend::XCUIPanelCanvasHostBackend;
using XCEngine::Editor::XCUIBackend::XCUIInputBridgeFrameSnapshot;
class ScopedImGuiContext final {
@@ -30,7 +29,7 @@ public:
ScopedImGuiContext& operator=(const ScopedImGuiContext&) = delete;
};
TEST(LegacyImGuiHostInteropTest, CreatesLegacyHostAdaptersWithImGuiBackends) {
TEST(LegacyImGuiHostInteropTest, CreatesLegacyHostAdaptersWithExpectedDebugNames) {
auto compositor = CreateLegacyImGuiWindowUICompositor();
auto presenter = CreateLegacyImGuiHostedPreviewPresenter();
auto canvasHost = CreateLegacyImGuiPanelCanvasHost();
@@ -38,12 +37,7 @@ TEST(LegacyImGuiHostInteropTest, CreatesLegacyHostAdaptersWithImGuiBackends) {
ASSERT_NE(compositor, nullptr);
ASSERT_NE(presenter, nullptr);
ASSERT_NE(canvasHost, nullptr);
EXPECT_EQ(canvasHost->GetBackend(), XCUIPanelCanvasHostBackend::ImGui);
const auto capabilities = canvasHost->GetCapabilities();
EXPECT_TRUE(capabilities.supportsPointerHitTesting);
EXPECT_TRUE(capabilities.supportsHostedSurfaceImages);
EXPECT_TRUE(capabilities.supportsPrimitiveOverlays);
EXPECT_STREQ(canvasHost->GetDebugName(), "ImGuiXCUIPanelCanvasHost");
}
TEST(LegacyImGuiHostInteropTest, ApplyInputCaptureCopiesImGuiIoFlagsIntoSnapshot) {