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

Commit 04bd9fb

Browse files
authored
Revert "[Impeller] Enable on-by-default on Android. (#54156)"
This reverts commit 2cf3986.
1 parent 353c6b2 commit 04bd9fb

File tree

7 files changed

+13
-22
lines changed

7 files changed

+13
-22
lines changed

common/settings.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ struct Settings {
223223

224224
// Enable the Impeller renderer on supported platforms. Ignored if Impeller is
225225
// not supported on the platform.
226-
#if FML_OS_ANDROID || FML_OS_IOS || FML_OS_IOS_SIMULATOR
226+
#if FML_OS_IOS || FML_OS_IOS_SIMULATOR
227227
bool enable_impeller = true;
228228
#else
229229
bool enable_impeller = false;

shell/platform/android/io/flutter/embedding/engine/FlutterShellArgs.java

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,8 @@ public class FlutterShellArgs {
4444
public static final String ARG_TRACE_SYSTRACE = "--trace-systrace";
4545
public static final String ARG_KEY_TRACE_TO_FILE = "trace-to-file";
4646
public static final String ARG_TRACE_TO_FILE = "--trace-to-file";
47-
public static final String ARG_KEY_TOGGLE_IMPELLER = "enable-impeller";
48-
public static final String ARG_ENABLE_IMPELLER = "--enable-impeller=true";
49-
public static final String ARG_DISABLE_IMPELLER = "--enable-impeller=false";
47+
public static final String ARG_KEY_ENABLE_IMPELLER = "enable-impeller";
48+
public static final String ARG_ENABLE_IMPELLER = "--enable-impeller";
5049
public static final String ARG_KEY_ENABLE_VULKAN_VALIDATION = "enable-vulkan-validation";
5150
public static final String ARG_ENABLE_VULKAN_VALIDATION = "--enable-vulkan-validation";
5251
public static final String ARG_KEY_DUMP_SHADER_SKP_ON_SHADER_COMPILATION =
@@ -122,12 +121,8 @@ public static FlutterShellArgs fromIntent(@NonNull Intent intent) {
122121
if (intent.hasExtra(ARG_KEY_TRACE_TO_FILE)) {
123122
args.add(ARG_TRACE_TO_FILE + "=" + intent.getStringExtra(ARG_KEY_TRACE_TO_FILE));
124123
}
125-
if (intent.hasExtra(ARG_KEY_TOGGLE_IMPELLER)) {
126-
if (intent.getBooleanExtra(ARG_KEY_TOGGLE_IMPELLER, false)) {
127-
args.add(ARG_ENABLE_IMPELLER);
128-
} else {
129-
args.add(ARG_DISABLE_IMPELLER);
130-
}
124+
if (intent.getBooleanExtra(ARG_KEY_ENABLE_IMPELLER, false)) {
125+
args.add(ARG_ENABLE_IMPELLER);
131126
}
132127
if (intent.getBooleanExtra(ARG_KEY_ENABLE_VULKAN_VALIDATION, false)) {
133128
args.add(ARG_ENABLE_VULKAN_VALIDATION);

shell/platform/android/io/flutter/embedding/engine/loader/FlutterLoader.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -345,12 +345,8 @@ public void ensureInitializationComplete(
345345
shellArgs.add("--prefetched-default-font-manager");
346346

347347
if (metaData != null) {
348-
if (metaData.containsKey(ENABLE_IMPELLER_META_DATA_KEY)) {
349-
if (metaData.getBoolean(ENABLE_IMPELLER_META_DATA_KEY)) {
350-
shellArgs.add("--enable-impeller=true");
351-
} else {
352-
shellArgs.add("--enable-impeller=false");
353-
}
348+
if (metaData.getBoolean(ENABLE_IMPELLER_META_DATA_KEY, false)) {
349+
shellArgs.add("--enable-impeller");
354350
}
355351
if (metaData.getBoolean(ENABLE_VULKAN_VALIDATION_META_DATA_KEY, false)) {
356352
shellArgs.add("--enable-vulkan-validation");

shell/platform/android/test/io/flutter/embedding/engine/loader/FlutterLoaderTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ public void itSetsEnableImpellerFromMetaData() {
228228
flutterLoader.ensureInitializationComplete(ctx, null);
229229
shadowOf(getMainLooper()).idle();
230230

231-
final String enableImpellerArg = "--enable-impeller=true";
231+
final String enableImpellerArg = "--enable-impeller";
232232
ArgumentCaptor<String[]> shellArgsCaptor = ArgumentCaptor.forClass(String[].class);
233233
verify(mockFlutterJNI, times(1))
234234
.init(eq(ctx), shellArgsCaptor.capture(), anyString(), anyString(), anyString(), anyLong());

shell/platform/darwin/ios/framework/Source/FlutterDartProject.mm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,10 @@ static BOOL DoesHardwareSupportWideGamut() {
176176
settings.enable_wide_gamut = enableWideGamut;
177177
#endif
178178

179+
// TODO(dnfield): We should reverse the order for all these settings so that command line options
180+
// are preferred to plist settings. https://github.com/flutter/flutter/issues/124049
181+
// Whether to enable Impeller. If the command line explicitly
182+
// specified an option for this, ignore what's in the plist.
179183
if (!command_line.HasOption("enable-impeller")) {
180184
// Next, look in the app bundle.
181185
NSNumber* enableImpeller = [bundle objectForInfoDictionaryKey:@"FLTEnableImpeller"];

testing/scenario_app/android/app/src/androidTest/java/dev/flutter/TestRunner.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ public void onCreate(@Nullable Bundle arguments) {
2323
"--enable-impeller=true",
2424
"--impeller-backend=" + arguments.getString("impeller-backend", "vulkan")
2525
};
26-
} else {
27-
engineArguments = new String[] {"--enable-impeller=false"};
2826
}
2927
FlutterRenderer.debugDisableSurfaceClear = true;
3028
if ("true".equals(arguments.getString("force-surface-producer-surface-texture"))) {

testing/scenario_app/bin/run_android_tests.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -417,9 +417,7 @@ Future<void> _run({
417417
if (smokeTestFullPath != null)
418418
'-e class $smokeTestFullPath',
419419
if (enableImpeller)
420-
'-e enable-impeller true'
421-
else
422-
'-e enable-impeller false',
420+
'-e enable-impeller true',
423421
if (impellerBackend != null)
424422
'-e impeller-backend ${impellerBackend.name}',
425423
if (forceSurfaceProducerSurfaceTexture)

0 commit comments

Comments
 (0)