Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 941323d

Browse files
authored
Provisional iOS impeller flag flip (#40405)
1 parent d741696 commit 941323d

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

common/settings.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include <string>
1515
#include <vector>
1616

17+
#include "flutter/fml/build_config.h"
1718
#include "flutter/fml/closure.h"
1819
#include "flutter/fml/mapping.h"
1920
#include "flutter/fml/time/time_point.h"
@@ -210,7 +211,11 @@ struct Settings {
210211

211212
// Enable the Impeller renderer on supported platforms. Ignored if Impeller is
212213
// not supported on the platform.
214+
#if FML_OS_IOS || FML_OS_IOS_SIMULATOR
215+
bool enable_impeller = true;
216+
#else
213217
bool enable_impeller = false;
218+
#endif
214219

215220
// Data set by platform-specific embedders for use in font initialization.
216221
uint32_t font_initialization_data = 0;

shell/common/switches.cc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,8 +443,12 @@ Settings SettingsFromCommandLine(const fml::CommandLine& command_line) {
443443
settings.use_asset_fonts =
444444
!command_line.HasOption(FlagForSwitch(Switch::DisableAssetFonts));
445445

446-
settings.enable_impeller =
447-
command_line.HasOption(FlagForSwitch(Switch::EnableImpeller));
446+
std::string enable_impeller_value;
447+
if (command_line.GetOptionValue(FlagForSwitch(Switch::EnableImpeller),
448+
&enable_impeller_value)) {
449+
settings.enable_impeller =
450+
enable_impeller_value.empty() || "true" == enable_impeller_value;
451+
}
448452

449453
settings.enable_embedder_api =
450454
command_line.HasOption(FlagForSwitch(Switch::EnableEmbedderAPI));

testing/scenario_app/ios/Scenarios/Scenarios/Info.plist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,7 @@
4141
<string>UIInterfaceOrientationLandscapeLeft</string>
4242
<string>UIInterfaceOrientationLandscapeRight</string>
4343
</array>
44+
<key>FLTEnableImpeller</key>
45+
<false/>
4446
</dict>
4547
</plist>

0 commit comments

Comments
 (0)