[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.
This commit is contained in:
Jonah Williams 2023-08-14 13:54:15 -07:00 committed by GitHub
parent 5c96642fa0
commit 5de43e2017
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -145,16 +145,20 @@ abstract class RunCommandBase extends FlutterCommand with DeviceBasedDevelopment
) )
..addFlag('enable-software-rendering', ..addFlag('enable-software-rendering',
negatable: false, 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, ' 'This is useful when testing Flutter on emulators. By default, '
'Flutter will attempt to either use OpenGL or Vulkan and fall back ' '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', ..addFlag('skia-deterministic-rendering',
negatable: false, 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 ' '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', ..addMultiOption('dart-entrypoint-args',
abbr: 'a', abbr: 'a',
@ -682,19 +686,6 @@ class RunCommand extends RunCommandBase {
throwToolExit('Hot reload is not supported by ${device.name}. Run with "--no-hot".'); 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<String>? expFlags; List<String>? expFlags;