Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable AtlasEngine by default in Preview #13752

Merged
3 commits merged into from
Aug 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/cascadia/TerminalControl/ControlCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
return false;
}

if (Feature_AtlasEngine::IsEnabled() && _settings->UseAtlasEngine())
if (_settings->UseAtlasEngine())
{
_renderEngine = std::make_unique<::Microsoft::Console::Render::AtlasEngine>();
}
Expand Down
2 changes: 1 addition & 1 deletion src/cascadia/TerminalControl/TermControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2087,7 +2087,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
// GH#10211 - UNDER NO CIRCUMSTANCE should this fail. If it does, the
// whole app will crash instantaneously on launch, which is no good.
double scale;
if (Feature_AtlasEngine::IsEnabled() && settings.UseAtlasEngine())
if (settings.UseAtlasEngine())
{
auto engine = std::make_unique<::Microsoft::Console::Render::AtlasEngine>();
LOG_IF_FAILED(engine->UpdateDpi(dpi));
Expand Down
5 changes: 0 additions & 5 deletions src/cascadia/TerminalSettingsEditor/ProfileViewModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,11 +293,6 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
return _unfocusedAppearanceViewModel;
}

bool ProfileViewModel::AtlasEngineAvailable() const noexcept
{
return Feature_AtlasEngine::IsEnabled();
}

bool ProfileViewModel::VtPassthroughAvailable() const noexcept
{
return Feature_VtPassthroughMode::IsEnabled() && Feature_VtPassthroughModeSettingInUI::IsEnabled();
Expand Down
1 change: 0 additions & 1 deletion src/cascadia/TerminalSettingsEditor/ProfileViewModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
bool ShowUnfocusedAppearance();
void CreateUnfocusedAppearance();
void DeleteUnfocusedAppearance();
bool AtlasEngineAvailable() const noexcept;
bool VtPassthroughAvailable() const noexcept;

VIEW_MODEL_OBSERVABLE_PROPERTY(ProfileSubPage, CurrentPage);
Expand Down
1 change: 0 additions & 1 deletion src/cascadia/TerminalSettingsEditor/ProfileViewModel.idl
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ namespace Microsoft.Terminal.Settings.Editor
Boolean EditableUnfocusedAppearance { get; };
Boolean ShowUnfocusedAppearance { get; };
AppearanceViewModel UnfocusedAppearance { get; };
Boolean AtlasEngineAvailable { get; };
Boolean VtPassthroughAvailable { get; };

void CreateUnfocusedAppearance();
Expand Down
3 changes: 1 addition & 2 deletions src/cascadia/TerminalSettingsEditor/Profiles_Advanced.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@
<local:SettingContainer x:Uid="Profile_UseAtlasEngine"
ClearSettingValue="{x:Bind Profile.ClearUseAtlasEngine}"
HasSettingValue="{x:Bind Profile.HasUseAtlasEngine, Mode=OneWay}"
SettingOverrideSource="{x:Bind Profile.UseAtlasEngineOverrideSource, Mode=OneWay}"
Visibility="{x:Bind Profile.AtlasEngineAvailable}">
SettingOverrideSource="{x:Bind Profile.UseAtlasEngineOverrideSource, Mode=OneWay}">
<ToggleSwitch IsOn="{x:Bind Profile.UseAtlasEngine, Mode=TwoWay}"
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
</local:SettingContainer>
Expand Down
2 changes: 1 addition & 1 deletion src/cascadia/TerminalSettingsModel/MTSMSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Author(s):
X(CloseOnExitMode, CloseOnExit, "closeOnExit", CloseOnExitMode::Automatic) \
X(hstring, TabTitle, "tabTitle") \
X(Model::BellStyle, BellStyle, "bellStyle", BellStyle::Audible) \
X(bool, UseAtlasEngine, "experimental.useAtlasEngine", false) \
X(bool, UseAtlasEngine, "experimental.useAtlasEngine", Feature_AtlasEngine::IsEnabled()) \
X(Windows::Foundation::Collections::IVector<winrt::hstring>, BellSound, "bellSound", nullptr) \
X(bool, Elevate, "elevate", false) \
X(bool, VtPassthrough, "experimental.connection.passthroughMode", false) \
Expand Down
12 changes: 11 additions & 1 deletion src/features.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@
<brandingToken>WindowsInbox</brandingToken>
</alwaysDisabledBrandingTokens>
</feature>

<feature>
<name>Feature_ConhostAtlasEngine</name>
<description>Controls whether conhost supports the Atlas engine</description>
<stage>AlwaysEnabled</stage>
<alwaysDisabledBrandingTokens>
<brandingToken>WindowsInbox</brandingToken>
</alwaysDisabledBrandingTokens>
</feature>

<feature>
<name>Feature_DxEngineShaderSupport</name>
<description>Controls whether the DX engine is built with shader support.</description>
Expand All @@ -59,7 +69,7 @@

<feature>
<name>Feature_AtlasEngine</name>
<description>If enabled, AtlasEngine and the experimental.useAtlasEngine setting are compiled into the project</description>
<description>If enabled, AtlasEngine is used by default</description>
<stage>AlwaysEnabled</stage>
<alwaysDisabledBrandingTokens>
<brandingToken>Release</brandingToken>
Expand Down
10 changes: 5 additions & 5 deletions src/interactivity/win32/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "../../renderer/base/renderer.hpp"
#include "../../renderer/gdi/gdirenderer.hpp"

#if TIL_FEATURE_ATLASENGINE_ENABLED
#if TIL_FEATURE_CONHOSTATLASENGINE_ENABLED
#include "../../renderer/atlas/AtlasEngine.h"
#endif
#if TIL_FEATURE_CONHOSTDXENGINE_ENABLED
Expand Down Expand Up @@ -74,7 +74,7 @@ Window::~Window()
#if TIL_FEATURE_CONHOSTDXENGINE_ENABLED
delete pDxEngine;
#endif
#if TIL_FEATURE_ATLASENGINE_ENABLED
#if TIL_FEATURE_CONHOSTATLASENGINE_ENABLED
delete pAtlasEngine;
#endif
#endif
Expand Down Expand Up @@ -231,7 +231,7 @@ void Window::_UpdateSystemMetrics() const
g.pRender->AddRenderEngine(pDxEngine);
break;
#endif
#if TIL_FEATURE_ATLASENGINE_ENABLED
#if TIL_FEATURE_CONHOSTATLASENGINE_ENABLED
case UseDx::AtlasEngine:
pAtlasEngine = new AtlasEngine();
g.pRender->AddRenderEngine(pAtlasEngine);
Expand Down Expand Up @@ -344,14 +344,14 @@ void Window::_UpdateSystemMetrics() const
}
else
#endif
#if TIL_FEATURE_ATLASENGINE_ENABLED
#if TIL_FEATURE_CONHOSTATLASENGINE_ENABLED
if (pAtlasEngine)
{
status = NTSTATUS_FROM_WIN32(HRESULT_CODE((pAtlasEngine->SetHwnd(hWnd))));
}
else
#endif
{
#endif
status = NTSTATUS_FROM_WIN32(HRESULT_CODE((pGdiEngine->SetHwnd(hWnd))));
}

Expand Down
2 changes: 1 addition & 1 deletion src/interactivity/win32/window.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ namespace Microsoft::Console::Interactivity::Win32
#if TIL_FEATURE_CONHOSTDXENGINE_ENABLED
Render::DxEngine* pDxEngine = nullptr;
#endif
#if TIL_FEATURE_ATLASENGINE_ENABLED
#if TIL_FEATURE_CONHOSTATLASENGINE_ENABLED
Render::AtlasEngine* pAtlasEngine = nullptr;
#endif

Expand Down