From 92812bf31606f8f782f97ea1bb368ce63f5df6cd Mon Sep 17 00:00:00 2001 From: Michael Niksa Date: Tue, 5 May 2020 23:03:07 +0000 Subject: [PATCH] Merged PR 4645239: [Git2Git] Merged PR 4644345: conhost: disable the DX renderer in inbox builds [Git2Git] Merged PR 4644345: conhost: disable the DX renderer in inbox builds We're going to be taking on some changes to the Dx renderer that are at the very least annoying and at the very most inconsequential to the inbox console. This commit removes support for the DX renderer from the inbox console. SizeBench reports that ConRenderDx contributes 55.1kb to the conhost image (as its third largest constituent library), so this should net us a couple pleasant WPG improvements down the line. Related work items: #26291552 Retrieved from https://microsoft.visualstudio.com os OS official/rs_onecore_dep_uxp 6e36786d447b7975298ba31ccd77c5c649fbfbe6 Related work items: #26291552 --- src/host/sources.inc | 1 - src/host/ut_host/VtIoTests.cpp | 5 +++++ src/host/ut_host/sources | 2 +- src/interactivity/win32/sources.inc | 2 +- src/interactivity/win32/ut_interactivity_win32/sources | 1 - src/interactivity/win32/window.cpp | 6 +++++- src/renderer/dirs | 1 - src/terminal/adapter/ut_adapter/sources | 1 - src/terminal/parser/ut_parser/sources | 1 - 9 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/host/sources.inc b/src/host/sources.inc index b91393510..fae931ef2 100644 --- a/src/host/sources.inc +++ b/src/host/sources.inc @@ -190,7 +190,6 @@ TARGETLIBS = \ $(WINCORE_OBJ_PATH)\console\open\src\terminal\adapter\lib\$(O)\ConTermAdapter.lib \ $(WINCORE_OBJ_PATH)\console\open\src\terminal\parser\lib\$(O)\ConTermParser.lib \ $(WINCORE_OBJ_PATH)\console\open\src\renderer\base\lib\$(O)\ConRenderBase.lib \ - $(WINCORE_OBJ_PATH)\console\open\src\renderer\dx\lib\$(O)\ConRenderDx.lib \ $(WINCORE_OBJ_PATH)\console\open\src\renderer\gdi\lib\$(O)\ConRenderGdi.lib \ $(WINCORE_OBJ_PATH)\console\open\src\renderer\vt\lib\$(O)\ConRenderVt.lib \ $(WINCORE_OBJ_PATH)\console\open\src\renderer\wddmcon\lib\$(O)\ConRenderWddmCon.lib \ diff --git a/src/host/ut_host/VtIoTests.cpp b/src/host/ut_host/VtIoTests.cpp index 9d725d79b..f9f609464 100644 --- a/src/host/ut_host/VtIoTests.cpp +++ b/src/host/ut_host/VtIoTests.cpp @@ -35,7 +35,10 @@ class Microsoft::Console::VirtualTerminal::VtIoTests TEST_METHOD(DtorTestStackAllocMany); TEST_METHOD(RendererDtorAndThread); + +#ifndef __INSIDE_WINDOWS TEST_METHOD(RendererDtorAndThreadAndDx); +#endif TEST_METHOD(BasicAnonymousPipeOpeningWithSignalChannelTest); }; @@ -370,6 +373,7 @@ void VtIoTests::RendererDtorAndThread() } } +#ifndef __INSIDE_WINDOWS void VtIoTests::RendererDtorAndThreadAndDx() { Log::Comment(NoThrowString().Format( @@ -396,6 +400,7 @@ void VtIoTests::RendererDtorAndThreadAndDx() pRenderer.reset(); } } +#endif void VtIoTests::BasicAnonymousPipeOpeningWithSignalChannelTest() { diff --git a/src/host/ut_host/sources b/src/host/ut_host/sources index 7138c4db1..e2327d08b 100644 --- a/src/host/ut_host/sources +++ b/src/host/ut_host/sources @@ -70,5 +70,5 @@ TARGETLIBS = \ # ------------------------------------- # Autogenerated. Sets file name for Device Guard whitelisting effort, used in RC.exe. -C_DEFINES = $(C_DEFINES) -D___TARGETNAME="""$(TARGETNAME).$(TARGETTYPE)""" +C_DEFINES = $(C_DEFINES) -D___TARGETNAME="""$(TARGETNAME).$(TARGETTYPE)""" -D__INSIDE_WINDOWS MUI_VERIFY_NO_LOC_RESOURCE = 1 diff --git a/src/interactivity/win32/sources.inc b/src/interactivity/win32/sources.inc index a4b05c5a9..266b5d222 100644 --- a/src/interactivity/win32/sources.inc +++ b/src/interactivity/win32/sources.inc @@ -12,7 +12,7 @@ # Preprocessor Settings # ------------------------------------- -C_DEFINES = $(C_DEFINES) -DFE_SB +C_DEFINES = $(C_DEFINES) -DFE_SB -D__INSIDE_WINDOWS # ------------------------------------- # Compiler Settings diff --git a/src/interactivity/win32/ut_interactivity_win32/sources b/src/interactivity/win32/ut_interactivity_win32/sources index 4e64b85aa..d2c786f89 100644 --- a/src/interactivity/win32/ut_interactivity_win32/sources +++ b/src/interactivity/win32/ut_interactivity_win32/sources @@ -82,7 +82,6 @@ TARGETLIBS = \ $(WINCORE_OBJ_PATH)\console\open\src\terminal\input\lib\$(O)\ConTermInput.lib \ $(WINCORE_OBJ_PATH)\console\open\src\terminal\parser\lib\$(O)\ConTermParser.lib \ $(WINCORE_OBJ_PATH)\console\open\src\renderer\base\lib\$(O)\ConRenderBase.lib \ - $(WINCORE_OBJ_PATH)\console\open\src\renderer\dx\lib\$(O)\ConRenderDx.lib \ $(WINCORE_OBJ_PATH)\console\open\src\renderer\gdi\lib\$(O)\ConRenderGdi.lib \ $(WINCORE_OBJ_PATH)\console\open\src\renderer\vt\lib\$(O)\ConRenderVt.lib \ $(WINCORE_OBJ_PATH)\console\open\src\renderer\wddmcon\lib\$(O)\ConRenderWddmCon.lib \ diff --git a/src/interactivity/win32/window.cpp b/src/interactivity/win32/window.cpp index 8be70e457..35bcf9610 100644 --- a/src/interactivity/win32/window.cpp +++ b/src/interactivity/win32/window.cpp @@ -206,9 +206,10 @@ void Window::_UpdateSystemMetrics() const const bool useDx = pSettings->GetUseDx(); GdiEngine* pGdiEngine = nullptr; - DxEngine* pDxEngine = nullptr; + [[maybe_unused]] DxEngine* pDxEngine = nullptr; try { +#ifndef __INSIDE_WINDOWS if (useDx) { pDxEngine = new DxEngine(); @@ -221,6 +222,7 @@ void Window::_UpdateSystemMetrics() const g.pRender->AddRenderEngine(pDxEngine); } else +#endif { pGdiEngine = new GdiEngine(); g.pRender->AddRenderEngine(pGdiEngine); @@ -308,6 +310,7 @@ void Window::_UpdateSystemMetrics() const { _hWnd = hWnd; +#ifndef __INSIDE_WINDOWS if (useDx) { status = NTSTATUS_FROM_WIN32(HRESULT_CODE((pDxEngine->SetHwnd(hWnd)))); @@ -318,6 +321,7 @@ void Window::_UpdateSystemMetrics() const } } else +#endif { status = NTSTATUS_FROM_WIN32(HRESULT_CODE((pGdiEngine->SetHwnd(hWnd)))); } diff --git a/src/renderer/dirs b/src/renderer/dirs index c6e4c0eb9..65488397e 100644 --- a/src/renderer/dirs +++ b/src/renderer/dirs @@ -1,6 +1,5 @@ DIRS= \ base \ - dx \ gdi \ wddmcon \ vt \ diff --git a/src/terminal/adapter/ut_adapter/sources b/src/terminal/adapter/ut_adapter/sources index 5999c3f0b..7f29b8d85 100644 --- a/src/terminal/adapter/ut_adapter/sources +++ b/src/terminal/adapter/ut_adapter/sources @@ -85,7 +85,6 @@ TARGETLIBS = \ $(WINCORE_OBJ_PATH)\console\open\src\terminal\input\lib\$(O)\ConTermInput.lib \ $(WINCORE_OBJ_PATH)\console\open\src\terminal\parser\lib\$(O)\ConTermParser.lib \ $(WINCORE_OBJ_PATH)\console\open\src\renderer\base\lib\$(O)\ConRenderBase.lib \ - $(WINCORE_OBJ_PATH)\console\open\src\renderer\dx\lib\$(O)\ConRenderDx.lib \ $(WINCORE_OBJ_PATH)\console\open\src\renderer\gdi\lib\$(O)\ConRenderGdi.lib \ $(WINCORE_OBJ_PATH)\console\open\src\renderer\wddmcon\lib\$(O)\ConRenderWddmCon.lib \ $(WINCORE_OBJ_PATH)\console\open\src\renderer\vt\lib\$(O)\ConRenderVt.lib \ diff --git a/src/terminal/parser/ut_parser/sources b/src/terminal/parser/ut_parser/sources index 22b72fdac..a7f53883e 100644 --- a/src/terminal/parser/ut_parser/sources +++ b/src/terminal/parser/ut_parser/sources @@ -78,7 +78,6 @@ TARGETLIBS = \ $(CONSOLE_OBJ_PATH)\terminal\adapter\lib\$(O)\ConTermAdapter.lib \ $(CONSOLE_OBJ_PATH)\terminal\parser\lib\$(O)\ConTermParser.lib \ $(CONSOLE_OBJ_PATH)\renderer\base\lib\$(O)\ConRenderBase.lib \ - $(CONSOLE_OBJ_PATH)\renderer\dx\lib\$(O)\ConRenderDx.lib \ $(CONSOLE_OBJ_PATH)\renderer\gdi\lib\$(O)\ConRenderGdi.lib \ $(CONSOLE_OBJ_PATH)\renderer\wddmcon\lib\$(O)\ConRenderWddmCon.lib \ $(CONSOLE_OBJ_PATH)\renderer\vt\lib\$(O)\ConRenderVt.lib \