diff --git a/doc/cascadia/profiles.schema.json b/doc/cascadia/profiles.schema.json index c06780f669e..e60b1151268 100644 --- a/doc/cascadia/profiles.schema.json +++ b/doc/cascadia/profiles.schema.json @@ -2237,10 +2237,10 @@ "description": "Use to set a path to a pixel shader to use with the Terminal. Overrides `experimental.retroTerminalEffect`. This is an experimental feature, and its continued existence is not guaranteed.", "type": "string" }, - "experimental.useAtlasEngine": { - "description": "Enable using the experimental new rendering engine for this profile. This is an experimental feature, and its continued existence is not guaranteed.", + "useAtlasEngine": { + "description": "Windows Terminal 1.16 and later ship with a new, performant text renderer. Set this to false to revert back to the old text renderer.", "type": "boolean", - "default": false + "default": true }, "fontFace": { "default": "Cascadia Mono", diff --git a/src/cascadia/TerminalSettingsEditor/MainPage.cpp b/src/cascadia/TerminalSettingsEditor/MainPage.cpp index a1b8f45854c..26629625aa4 100644 --- a/src/cascadia/TerminalSettingsEditor/MainPage.cpp +++ b/src/cascadia/TerminalSettingsEditor/MainPage.cpp @@ -374,7 +374,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation } else if (clickedItemTag == renderingTag) { - contentFrame().Navigate(xaml_typename(), winrt::make(_settingsClone.GlobalSettings())); + contentFrame().Navigate(xaml_typename(), winrt::make(_settingsClone)); const auto crumb = winrt::make(box_value(clickedItemTag), RS_(L"Nav_Rendering/Content"), BreadcrumbSubPage::None); _breadcrumbs.Append(crumb); } diff --git a/src/cascadia/TerminalSettingsEditor/Rendering.xaml b/src/cascadia/TerminalSettingsEditor/Rendering.xaml index 0f19ac0f88e..96a6ee95c6a 100644 --- a/src/cascadia/TerminalSettingsEditor/Rendering.xaml +++ b/src/cascadia/TerminalSettingsEditor/Rendering.xaml @@ -23,6 +23,12 @@ + + + + + , ViewModelHelper { - public: - RenderingViewModel(Model::GlobalAppSettings globalSettings); + explicit RenderingViewModel(Model::CascadiaSettings settings) noexcept; - PERMANENT_OBSERVABLE_PROJECTED_SETTING(_GlobalSettings, ForceFullRepaintRendering); - PERMANENT_OBSERVABLE_PROJECTED_SETTING(_GlobalSettings, SoftwareRendering); + PERMANENT_OBSERVABLE_PROJECTED_SETTING(_settings.ProfileDefaults(), UseAtlasEngine); + PERMANENT_OBSERVABLE_PROJECTED_SETTING(_settings.GlobalSettings(), ForceFullRepaintRendering); + PERMANENT_OBSERVABLE_PROJECTED_SETTING(_settings.GlobalSettings(), SoftwareRendering); private: - Model::GlobalAppSettings _GlobalSettings; + Model::CascadiaSettings _settings{ nullptr }; }; }; diff --git a/src/cascadia/TerminalSettingsEditor/RenderingViewModel.idl b/src/cascadia/TerminalSettingsEditor/RenderingViewModel.idl index b4ad306387b..c05438a6c59 100644 --- a/src/cascadia/TerminalSettingsEditor/RenderingViewModel.idl +++ b/src/cascadia/TerminalSettingsEditor/RenderingViewModel.idl @@ -9,8 +9,9 @@ namespace Microsoft.Terminal.Settings.Editor { runtimeclass RenderingViewModel : Windows.UI.Xaml.Data.INotifyPropertyChanged { - RenderingViewModel(Microsoft.Terminal.Settings.Model.GlobalAppSettings globalSettings); + RenderingViewModel(Microsoft.Terminal.Settings.Model.CascadiaSettings settings); + PERMANENT_OBSERVABLE_PROJECTED_SETTING(Boolean, UseAtlasEngine); PERMANENT_OBSERVABLE_PROJECTED_SETTING(Boolean, ForceFullRepaintRendering); PERMANENT_OBSERVABLE_PROJECTED_SETTING(Boolean, SoftwareRendering); } diff --git a/src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw b/src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw index 087eaba5f6e..dbd63e0f3f1 100644 --- a/src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw +++ b/src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw @@ -1075,8 +1075,8 @@ A description for what the "bell style" setting does. Presented near "Profile_BellStyle".{Locked="BEL"} - Enable experimental text rendering engine - An option to enable an experimental text rendering engine + Use the new text renderer ("AtlasEngine") + {Locked="AtlasEngine"} Enable experimental virtual terminal passthrough diff --git a/src/cascadia/TerminalSettingsModel/CascadiaSettingsSerialization.cpp b/src/cascadia/TerminalSettingsModel/CascadiaSettingsSerialization.cpp index cf1ea752cf1..f65f1884e99 100644 --- a/src/cascadia/TerminalSettingsModel/CascadiaSettingsSerialization.cpp +++ b/src/cascadia/TerminalSettingsModel/CascadiaSettingsSerialization.cpp @@ -893,6 +893,25 @@ try settings->_hash = _calculateHash(settingsString, lastWriteTime); } + // 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 : settings->_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)); + } + return *settings; } catch (const SettingsException& ex) diff --git a/src/cascadia/TerminalSettingsModel/MTSMSettings.h b/src/cascadia/TerminalSettingsModel/MTSMSettings.h index b9dd7c8f98d..27897ecb60e 100644 --- a/src/cascadia/TerminalSettingsModel/MTSMSettings.h +++ b/src/cascadia/TerminalSettingsModel/MTSMSettings.h @@ -78,7 +78,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", Feature_AtlasEngine::IsEnabled()) \ + X(bool, UseAtlasEngine, "useAtlasEngine", Feature_AtlasEngine::IsEnabled()) \ X(Windows::Foundation::Collections::IVector, BellSound, "bellSound", nullptr) \ X(bool, Elevate, "elevate", false) \ X(bool, VtPassthrough, "experimental.connection.passthroughMode", false) \