From 8a40ff0058115859a3c18bda12236bb69a3d6ad2 Mon Sep 17 00:00:00 2001 From: Zach Anderson Date: Fri, 17 Mar 2023 15:32:09 -0700 Subject: [PATCH] Provisional iOS impeller flag flip --- common/settings.h | 5 +++++ shell/common/switches.cc | 8 ++++++-- testing/scenario_app/ios/Scenarios/Scenarios/Info.plist | 2 ++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/common/settings.h b/common/settings.h index e5c394087646f..d4722b1dbda58 100644 --- a/common/settings.h +++ b/common/settings.h @@ -14,6 +14,7 @@ #include #include +#include "flutter/fml/build_config.h" #include "flutter/fml/closure.h" #include "flutter/fml/mapping.h" #include "flutter/fml/time/time_point.h" @@ -210,7 +211,11 @@ struct Settings { // Enable the Impeller renderer on supported platforms. Ignored if Impeller is // not supported on the platform. +#if FML_OS_IOS || FML_OS_IOS_SIMULATOR + bool enable_impeller = true; +#else bool enable_impeller = false; +#endif // Data set by platform-specific embedders for use in font initialization. uint32_t font_initialization_data = 0; diff --git a/shell/common/switches.cc b/shell/common/switches.cc index 63c12cbe3b4a9..a94d1cbabf061 100644 --- a/shell/common/switches.cc +++ b/shell/common/switches.cc @@ -443,8 +443,12 @@ Settings SettingsFromCommandLine(const fml::CommandLine& command_line) { settings.use_asset_fonts = !command_line.HasOption(FlagForSwitch(Switch::DisableAssetFonts)); - settings.enable_impeller = - command_line.HasOption(FlagForSwitch(Switch::EnableImpeller)); + std::string enable_impeller_value; + if (command_line.GetOptionValue(FlagForSwitch(Switch::EnableImpeller), + &enable_impeller_value)) { + settings.enable_impeller = + enable_impeller_value.empty() || "true" == enable_impeller_value; + } settings.enable_embedder_api = command_line.HasOption(FlagForSwitch(Switch::EnableEmbedderAPI)); diff --git a/testing/scenario_app/ios/Scenarios/Scenarios/Info.plist b/testing/scenario_app/ios/Scenarios/Scenarios/Info.plist index bc23fd5445d4d..0605d9602d839 100644 --- a/testing/scenario_app/ios/Scenarios/Scenarios/Info.plist +++ b/testing/scenario_app/ios/Scenarios/Scenarios/Info.plist @@ -41,5 +41,7 @@ UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight + FLTEnableImpeller +