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

[Impeller] Provisional iOS impeller flag-flip. #40405

Merged
merged 1 commit into from
Mar 18, 2023
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
5 changes: 5 additions & 0 deletions common/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <string>
#include <vector>

#include "flutter/fml/build_config.h"
#include "flutter/fml/closure.h"
#include "flutter/fml/mapping.h"
#include "flutter/fml/time/time_point.h"
Expand Down Expand Up @@ -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;
Expand Down
8 changes: 6 additions & 2 deletions shell/common/switches.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
2 changes: 2 additions & 0 deletions testing/scenario_app/ios/Scenarios/Scenarios/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,7 @@
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>FLTEnableImpeller</key>
<false/>
</dict>
</plist>