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
This commit is contained in:
Michael Niksa 2020-05-05 23:03:07 +00:00 committed by Dustin Howett
parent 8e67bb2d4f
commit 92812bf316
9 changed files with 12 additions and 8 deletions

View file

@ -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 \

View file

@ -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()
{

View file

@ -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

View file

@ -12,7 +12,7 @@
# Preprocessor Settings
# -------------------------------------
C_DEFINES = $(C_DEFINES) -DFE_SB
C_DEFINES = $(C_DEFINES) -DFE_SB -D__INSIDE_WINDOWS
# -------------------------------------
# Compiler Settings

View file

@ -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 \

View file

@ -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))));
}

View file

@ -1,6 +1,5 @@
DIRS= \
base \
dx \
gdi \
wddmcon \
vt \

View file

@ -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 \

View file

@ -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 \