[web] Reland - Switch web-render option default to auto (flutter/engine#23454)

This commit is contained in:
Ferhat 2021-01-06 10:00:52 -08:00 committed by GitHub
parent f45f182f5d
commit bc604a089f
2 changed files with 5 additions and 3 deletions

View File

@ -619,6 +619,8 @@ class TestCommand extends Command<bool> with ArgUtils {
'--enable-experiment=non-nullable',
'--no-sound-null-safety',
if (input.forCanvasKit) '-DFLUTTER_WEB_USE_SKIA=true',
if (!input.forCanvasKit) '-DFLUTTER_WEB_AUTO_DETECT=false',
if (!input.forCanvasKit) '-DFLUTTER_WEB_USE_SKIA=false',
'-O2',
'-o',
targetFileName, // target path.

View File

@ -28,10 +28,10 @@ bool _detectRenderer() {
/// Auto detect which rendering backend to use.
///
/// Using flutter tools option "--web-render=auto" would set the value to true.
/// Otherwise, it would be false.
/// Using flutter tools option "--web-render=auto" or not specifying one
/// would set the value to true. Otherwise, it would be false.
const bool _autoDetect =
bool.fromEnvironment('FLUTTER_WEB_AUTO_DETECT', defaultValue: false);
bool.fromEnvironment('FLUTTER_WEB_AUTO_DETECT', defaultValue: true);
/// Enable the Skia-based rendering backend.
///