Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[web] Reland - Switch web-render option default to auto #23454

Merged
merged 7 commits into from
Jan 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/web_ui/dev/test_runner.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: just so it doesn't look like there's a possibility of having FLUTTER_WEB_USE_SKIA twice we could do:

'-DFLUTTER_WEB_USE_SKIA=${input.forCanvasKit}',

'-O2',
'-o',
targetFileName, // target path.
Expand Down
6 changes: 3 additions & 3 deletions lib/web_ui/lib/src/engine/canvaskit/initialization.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand Down