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

Commit 8222475

Browse files
authored
[web] Reland - Switch web-render option default to auto (#23454)
1 parent 0099f50 commit 8222475

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

lib/web_ui/dev/test_runner.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,8 @@ class TestCommand extends Command<bool> with ArgUtils {
619619
'--enable-experiment=non-nullable',
620620
'--no-sound-null-safety',
621621
if (input.forCanvasKit) '-DFLUTTER_WEB_USE_SKIA=true',
622+
if (!input.forCanvasKit) '-DFLUTTER_WEB_AUTO_DETECT=false',
623+
if (!input.forCanvasKit) '-DFLUTTER_WEB_USE_SKIA=false',
622624
'-O2',
623625
'-o',
624626
targetFileName, // target path.

lib/web_ui/lib/src/engine/canvaskit/initialization.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ bool _detectRenderer() {
2828

2929
/// Auto detect which rendering backend to use.
3030
///
31-
/// Using flutter tools option "--web-render=auto" would set the value to true.
32-
/// Otherwise, it would be false.
31+
/// Using flutter tools option "--web-render=auto" or not specifying one
32+
/// would set the value to true. Otherwise, it would be false.
3333
const bool _autoDetect =
34-
bool.fromEnvironment('FLUTTER_WEB_AUTO_DETECT', defaultValue: false);
34+
bool.fromEnvironment('FLUTTER_WEB_AUTO_DETECT', defaultValue: true);
3535

3636
/// Enable the Skia-based rendering backend.
3737
///

0 commit comments

Comments
 (0)