Skip to content

Commit

Permalink
Enable AtlasEngine by default (#16277)
Browse files Browse the repository at this point in the history
This enables AtlasEngine by default in the 1.19 release branch.
A future change will remove the alternative DxEngine entirely.

(cherry picked from commit 204ebf3)
Service-Card-Id: 91158876
Service-Version: 1.19
  • Loading branch information
lhecker authored and DHowett committed Dec 4, 2023
1 parent e33de75 commit 85eee09
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -949,25 +949,6 @@ void CascadiaSettings::_researchOnLoad()
// Only do this if we're actually being sampled
if (TraceLoggingProviderEnabled(g_hSettingsModelProvider, 0, MICROSOFT_KEYWORD_MEASURES))
{
// GH#13936: We're interested in how many users opt out of useAtlasEngine,
// indicating major issues that would require us to disable it by default again.
{
size_t enabled[2]{};
for (const auto& profile : _activeProfiles)
{
enabled[profile.UseAtlasEngine()]++;
}

TraceLoggingWrite(
g_hSettingsModelProvider,
"AtlasEngine_Usage",
TraceLoggingDescription("Event emitted upon settings load, containing the number of profiles opted-in/out of useAtlasEngine"),
TraceLoggingUIntPtr(enabled[0], "UseAtlasEngineDisabled", "Number of profiles for which AtlasEngine is disabled"),
TraceLoggingUIntPtr(enabled[1], "UseAtlasEngineEnabled", "Number of profiles for which AtlasEngine is enabled"),
TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES),
TelemetryPrivacyDataTag(PDT_ProductAndServiceUsage));
}

// ----------------------------- RE: Themes ----------------------------
const auto numThemes = GlobalSettings().Themes().Size();
const auto themeInUse = GlobalSettings().CurrentTheme().Name();
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 @@ -90,7 +90,7 @@ Author(s):
X(hstring, TabTitle, "tabTitle") \
X(Model::BellStyle, BellStyle, "bellStyle", BellStyle::Audible) \
X(IEnvironmentVariableMap, EnvironmentVariables, "environment", nullptr) \
X(bool, UseAtlasEngine, "useAtlasEngine", Feature_AtlasEngine::IsEnabled()) \
X(bool, UseAtlasEngine, "useAtlasEngine", true) \
X(bool, RightClickContextMenu, "experimental.rightClickContextMenu", false) \
X(Windows::Foundation::Collections::IVector<winrt::hstring>, BellSound, "bellSound", nullptr) \
X(bool, Elevate, "elevate", false) \
Expand Down
2 changes: 1 addition & 1 deletion src/cascadia/TerminalSettingsModel/TerminalSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation
INHERITABLE_SETTING(Model::TerminalSettings, IEnvironmentVariableMap, EnvironmentVariables);

INHERITABLE_SETTING(Model::TerminalSettings, Microsoft::Terminal::Control::ScrollbarState, ScrollState, Microsoft::Terminal::Control::ScrollbarState::Visible);
INHERITABLE_SETTING(Model::TerminalSettings, bool, UseAtlasEngine, false);
INHERITABLE_SETTING(Model::TerminalSettings, bool, UseAtlasEngine, true);

INHERITABLE_SETTING(Model::TerminalSettings, Microsoft::Terminal::Control::TextAntialiasingMode, AntialiasingMode, Microsoft::Terminal::Control::TextAntialiasingMode::Grayscale);

Expand Down
18 changes: 12 additions & 6 deletions src/cascadia/UnitTests_Control/ControlCoreTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,12 @@ namespace ControlUnitTests

void _standardInit(winrt::com_ptr<Control::implementation::ControlCore> core)
{
// "Consolas" ends up with an actual size of 9x21 at 96DPI. So
// let's just arbitrarily start with a 270x420px (30x20 chars) window
core->Initialize(270, 420, 1.0);
// "Consolas" ends up with an actual size of 9x19 at 96DPI. So
// let's just arbitrarily start with a 270x380px (30x20 chars) window
core->Initialize(270, 380, 1.0);
#ifndef NDEBUG
core->_terminal->_suppressLockChecks = true;
#endif
VERIFY_IS_TRUE(core->_initializedTerminal);
VERIFY_ARE_EQUAL(20, core->_terminal->GetViewport().Height());
}
Expand Down Expand Up @@ -113,9 +116,12 @@ namespace ControlUnitTests
VERIFY_IS_NOT_NULL(core);

VERIFY_IS_FALSE(core->_initializedTerminal);
// "Consolas" ends up with an actual size of 9x21 at 96DPI. So
// let's just arbitrarily start with a 270x420px (30x20 chars) window
core->Initialize(270, 420, 1.0);
// "Consolas" ends up with an actual size of 9x19 at 96DPI. So
// let's just arbitrarily start with a 270x380px (30x20 chars) window
core->Initialize(270, 380, 1.0);
#ifndef NDEBUG
core->_terminal->_suppressLockChecks = true;
#endif
VERIFY_IS_TRUE(core->_initializedTerminal);
VERIFY_ARE_EQUAL(30, core->_terminal->GetViewport().Width());
}
Expand Down
9 changes: 6 additions & 3 deletions src/cascadia/UnitTests_Control/ControlInteractivityTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,12 @@ namespace ControlUnitTests
void _standardInit(winrt::com_ptr<Control::implementation::ControlCore> core,
winrt::com_ptr<Control::implementation::ControlInteractivity> interactivity)
{
// "Consolas" ends up with an actual size of 9x21 at 96DPI. So
// let's just arbitrarily start with a 270x420px (30x20 chars) window
core->Initialize(270, 420, 1.0);
// "Consolas" ends up with an actual size of 9x19 at 96DPI. So
// let's just arbitrarily start with a 270x380px (30x20 chars) window
core->Initialize(270, 380, 1.0);
#ifndef NDEBUG
core->_terminal->_suppressLockChecks = true;
#endif
VERIFY_IS_TRUE(core->_initializedTerminal);
VERIFY_ARE_EQUAL(20, core->_terminal->GetViewport().Height());
interactivity->Initialize();
Expand Down
2 changes: 1 addition & 1 deletion src/cascadia/inc/ControlProperties.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
X(winrt::Microsoft::Terminal::Control::TextAntialiasingMode, AntialiasingMode, winrt::Microsoft::Terminal::Control::TextAntialiasingMode::Grayscale) \
X(bool, ForceFullRepaintRendering, false) \
X(bool, SoftwareRendering, false) \
X(bool, UseAtlasEngine, false) \
X(bool, UseAtlasEngine, true) \
X(bool, UseBackgroundImageForWindow, false) \
X(bool, ShowMarks, false) \
X(bool, RightClickContextMenu, false)
10 changes: 0 additions & 10 deletions src/features.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,6 @@
</alwaysEnabledBrandingTokens>
</feature>

<feature>
<name>Feature_AtlasEngine</name>
<description>If enabled, AtlasEngine is used by default</description>
<stage>AlwaysEnabled</stage>
<alwaysDisabledBrandingTokens>
<brandingToken>Release</brandingToken>
<brandingToken>WindowsInbox</brandingToken>
</alwaysDisabledBrandingTokens>
</feature>

<feature>
<name>Feature_AtlasEnginePresentFallback</name>
<description>We don't feel super confident in our usage of the Present1 API, so this settings adds a fallback to Present on error</description>
Expand Down

0 comments on commit 85eee09

Please sign in to comment.