From 5de43e2017b28406fac946a727eb1bc3b773b801 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Mon, 14 Aug 2023 13:54:15 -0700 Subject: [PATCH] [flutter_tools] hide Skia specific rendering options. (#132509) At some point in the near future, we'll start an Impeller on Android preivew - and later make it the default. Unlike Skia, Impeller does not have a fallback software rendering mode. We'd like to stop suggesting this as an option now, and in the future remove the option to force software rendering. Once impeller is the default, asking for software rendering on Android will result in either an error or falling back to Skia. --- .../flutter_tools/lib/src/commands/run.dart | 25 ++++++------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/packages/flutter_tools/lib/src/commands/run.dart b/packages/flutter_tools/lib/src/commands/run.dart index 61829b16eb..67b5c0aece 100644 --- a/packages/flutter_tools/lib/src/commands/run.dart +++ b/packages/flutter_tools/lib/src/commands/run.dart @@ -145,16 +145,20 @@ abstract class RunCommandBase extends FlutterCommand with DeviceBasedDevelopment ) ..addFlag('enable-software-rendering', negatable: false, - help: 'Enable rendering using the Skia software backend. ' + help: '(deprecated) Enable rendering using the Skia software backend. ' 'This is useful when testing Flutter on emulators. By default, ' 'Flutter will attempt to either use OpenGL or Vulkan and fall back ' - 'to software when neither is available.', + 'to software when neither is available. This option is not supported ' + 'when using the Impeller rendering engine.', + hide: !verboseHelp, ) ..addFlag('skia-deterministic-rendering', negatable: false, - help: 'When combined with "--enable-software-rendering", this should provide completely ' + help: '(deprecated) When combined with "--enable-software-rendering", this should provide completely ' 'deterministic (i.e. reproducible) Skia rendering. This is useful for testing purposes ' - '(e.g. when comparing screenshots).', + '(e.g. when comparing screenshots). This option is not supported ' + 'when using the Impeller rendering engine.', + hide: !verboseHelp, ) ..addMultiOption('dart-entrypoint-args', abbr: 'a', @@ -682,19 +686,6 @@ class RunCommand extends RunCommandBase { throwToolExit('Hot reload is not supported by ${device.name}. Run with "--no-hot".'); } } - if (await device.isLocalEmulator && await device.supportsHardwareRendering) { - if (boolArg('enable-software-rendering')) { - globals.printStatus( - 'Using software rendering with device ${device.name}. You may get better performance ' - 'with hardware mode by configuring hardware rendering for your device.' - ); - } else { - globals.printStatus( - 'Using hardware rendering with device ${device.name}. If you notice graphics artifacts, ' - 'consider enabling software rendering with "--enable-software-rendering".' - ); - } - } } List? expFlags;