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

Revert "[Impeller] Enable on-by-default on Android." #54321

Closed
wants to merge 1 commit into from
Closed
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
2 changes: 1 addition & 1 deletion common/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ struct Settings {

// Enable the Impeller renderer on supported platforms. Ignored if Impeller is
// not supported on the platform.
#if FML_OS_ANDROID || FML_OS_IOS || FML_OS_IOS_SIMULATOR
#if FML_OS_IOS || FML_OS_IOS_SIMULATOR
bool enable_impeller = true;
#else
bool enable_impeller = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,8 @@ public class FlutterShellArgs {
public static final String ARG_TRACE_SYSTRACE = "--trace-systrace";
public static final String ARG_KEY_TRACE_TO_FILE = "trace-to-file";
public static final String ARG_TRACE_TO_FILE = "--trace-to-file";
public static final String ARG_KEY_TOGGLE_IMPELLER = "enable-impeller";
public static final String ARG_ENABLE_IMPELLER = "--enable-impeller=true";
public static final String ARG_DISABLE_IMPELLER = "--enable-impeller=false";
public static final String ARG_KEY_ENABLE_IMPELLER = "enable-impeller";
public static final String ARG_ENABLE_IMPELLER = "--enable-impeller";
public static final String ARG_KEY_ENABLE_VULKAN_VALIDATION = "enable-vulkan-validation";
public static final String ARG_ENABLE_VULKAN_VALIDATION = "--enable-vulkan-validation";
public static final String ARG_KEY_DUMP_SHADER_SKP_ON_SHADER_COMPILATION =
Expand Down Expand Up @@ -122,12 +121,8 @@ public static FlutterShellArgs fromIntent(@NonNull Intent intent) {
if (intent.hasExtra(ARG_KEY_TRACE_TO_FILE)) {
args.add(ARG_TRACE_TO_FILE + "=" + intent.getStringExtra(ARG_KEY_TRACE_TO_FILE));
}
if (intent.hasExtra(ARG_KEY_TOGGLE_IMPELLER)) {
if (intent.getBooleanExtra(ARG_KEY_TOGGLE_IMPELLER, false)) {
args.add(ARG_ENABLE_IMPELLER);
} else {
args.add(ARG_DISABLE_IMPELLER);
}
if (intent.getBooleanExtra(ARG_KEY_ENABLE_IMPELLER, false)) {
args.add(ARG_ENABLE_IMPELLER);
}
if (intent.getBooleanExtra(ARG_KEY_ENABLE_VULKAN_VALIDATION, false)) {
args.add(ARG_ENABLE_VULKAN_VALIDATION);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,12 +345,8 @@ public void ensureInitializationComplete(
shellArgs.add("--prefetched-default-font-manager");

if (metaData != null) {
if (metaData.containsKey(ENABLE_IMPELLER_META_DATA_KEY)) {
if (metaData.getBoolean(ENABLE_IMPELLER_META_DATA_KEY)) {
shellArgs.add("--enable-impeller=true");
} else {
shellArgs.add("--enable-impeller=false");
}
if (metaData.getBoolean(ENABLE_IMPELLER_META_DATA_KEY, false)) {
shellArgs.add("--enable-impeller");
}
if (metaData.getBoolean(ENABLE_VULKAN_VALIDATION_META_DATA_KEY, false)) {
shellArgs.add("--enable-vulkan-validation");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ public void itSetsEnableImpellerFromMetaData() {
flutterLoader.ensureInitializationComplete(ctx, null);
shadowOf(getMainLooper()).idle();

final String enableImpellerArg = "--enable-impeller=true";
final String enableImpellerArg = "--enable-impeller";
ArgumentCaptor<String[]> shellArgsCaptor = ArgumentCaptor.forClass(String[].class);
verify(mockFlutterJNI, times(1))
.init(eq(ctx), shellArgsCaptor.capture(), anyString(), anyString(), anyString(), anyLong());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ static BOOL DoesHardwareSupportWideGamut() {
settings.enable_wide_gamut = enableWideGamut;
#endif

// TODO(dnfield): We should reverse the order for all these settings so that command line options
// are preferred to plist settings. https://github.com/flutter/flutter/issues/124049
// Whether to enable Impeller. If the command line explicitly
// specified an option for this, ignore what's in the plist.
if (!command_line.HasOption("enable-impeller")) {
// Next, look in the app bundle.
NSNumber* enableImpeller = [bundle objectForInfoDictionaryKey:@"FLTEnableImpeller"];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ public void onCreate(@Nullable Bundle arguments) {
"--enable-impeller=true",
"--impeller-backend=" + arguments.getString("impeller-backend", "vulkan")
};
} else {
engineArguments = new String[] {"--enable-impeller=false"};
}
FlutterRenderer.debugDisableSurfaceClear = true;
if ("true".equals(arguments.getString("force-surface-producer-surface-texture"))) {
Expand Down
4 changes: 1 addition & 3 deletions testing/scenario_app/bin/run_android_tests.dart
Original file line number Diff line number Diff line change
Expand Up @@ -417,9 +417,7 @@ Future<void> _run({
if (smokeTestFullPath != null)
'-e class $smokeTestFullPath',
if (enableImpeller)
'-e enable-impeller true'
else
'-e enable-impeller false',
'-e enable-impeller true',
if (impellerBackend != null)
'-e impeller-backend ${impellerBackend.name}',
if (forceSurfaceProducerSurfaceTexture)
Expand Down