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

Commit 19707e8

Browse files
[Impeller] enable Impeller by default on Android. (#53099)
All plugin migrations have landed. Enable impeller by default on Android.
1 parent 4adf453 commit 19707e8

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

common/settings.h

+1-1
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_IOS || FML_OS_IOS_SIMULATOR
226+
#if FML_OS_IOS || FML_OS_IOS_SIMULATOR || FML_OS_ANDROID
227227
bool enable_impeller = true;
228228
#else
229229
bool enable_impeller = false;

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public class FlutterShellArgs {
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";
4747
public static final String ARG_KEY_ENABLE_IMPELLER = "enable-impeller";
48-
public static final String ARG_ENABLE_IMPELLER = "--enable-impeller";
48+
public static final String ARG_DISABLE_IMPELLER = "--enable-impeller=false";
4949
public static final String ARG_KEY_ENABLE_VULKAN_VALIDATION = "enable-vulkan-validation";
5050
public static final String ARG_ENABLE_VULKAN_VALIDATION = "--enable-vulkan-validation";
5151
public static final String ARG_KEY_DUMP_SHADER_SKP_ON_SHADER_COMPILATION =
@@ -123,8 +123,8 @@ public static FlutterShellArgs fromIntent(@NonNull Intent intent) {
123123
if (intent.hasExtra(ARG_KEY_TRACE_TO_FILE)) {
124124
args.add(ARG_TRACE_TO_FILE + "=" + intent.getStringExtra(ARG_KEY_TRACE_TO_FILE));
125125
}
126-
if (intent.getBooleanExtra(ARG_KEY_ENABLE_IMPELLER, false)) {
127-
args.add(ARG_ENABLE_IMPELLER);
126+
if (!intent.getBooleanExtra(ARG_KEY_ENABLE_IMPELLER, true)) {
127+
args.add(ARG_DISABLE_IMPELLER);
128128
}
129129
if (intent.getBooleanExtra(ARG_KEY_ENABLE_VULKAN_VALIDATION, false)) {
130130
args.add(ARG_ENABLE_VULKAN_VALIDATION);

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

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ 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"};
2628
}
2729
FlutterRenderer.debugDisableSurfaceClear = true;
2830
if ("true".equals(arguments.getString("force-surface-producer-surface-texture"))) {

testing/scenario_app/bin/run_android_tests.dart

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

0 commit comments

Comments
 (0)