[go: nahoru, domu]

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][breaking] Change --web-renderer default from auto to canvaskit #149826

Closed
mdebbar opened this issue Jun 6, 2024 · 5 comments · Fixed by #149773
Closed

[web][breaking] Change --web-renderer default from auto to canvaskit #149826

mdebbar opened this issue Jun 6, 2024 · 5 comments · Fixed by #149773
Assignees
Labels
c: API break Backwards-incompatible API changes e: web_canvaskit CanvasKit (a.k.a. Skia-on-WebGL) rendering backend for Web e: web_html HTML rendering backend for Web P1 High-priority issues at the top of the work list platform-web Web applications specifically team-web Owned by Web platform team tool Affects the "flutter" command-line tool. See also t: labels. triaged-web Triaged by Web platform team

Comments

@mdebbar
Copy link
Contributor
mdebbar commented Jun 6, 2024

Summary

The --web-renderer CLI argument's default value is changing from auto to canvaskit.

Background

The CanvasKit renderer has come a long way since the early days of Flutter Web. Many bugs have been fixed, and the size has been reasonably decreased. We now consider the CanvasKit renderer mature enough to be the default renderer for Flutter Web.

Migration guide

We recommend using the canvaskit renderer, and that's why we are making it the default. But if you have a need for the auto renderer, then you need to explicitly pass it as a CLI argument (please give us feedback on why you need auto or html renderers here).

Command before migration:

flutter run -d chrome

Command after migration:

flutter run -d chrome --web-renderer=auto
@mdebbar mdebbar added tool Affects the "flutter" command-line tool. See also t: labels. c: API break Backwards-incompatible API changes platform-web Web applications specifically e: web_html HTML rendering backend for Web e: web_canvaskit CanvasKit (a.k.a. Skia-on-WebGL) rendering backend for Web P1 High-priority issues at the top of the work list team-web Owned by Web platform team triaged-web Triaged by Web platform team labels Jun 6, 2024
@mdebbar mdebbar self-assigned this Jun 6, 2024
@mdebbar mdebbar changed the title [web] Change --web-renderer default from auto to canvaskit [web][breaking] Change --web-renderer default from auto to canvaskit Jun 6, 2024
sfshaza2 pushed a commit to flutter/website that referenced this issue Jun 6, 2024
)

Changes the documentation of the default renderer on web. The default
renderer is changing from `auto` to `canvaskit`.

_This PR is mostly moving things around with no new content being
added._

The PR making the code changes:
flutter/flutter#149773
The issue: flutter/flutter#149826

## Presubmit checklist

- [x] This PR doesn’t contain automatically generated corrections
(Grammarly or similar).
- [x] This PR follows the [Google Developer Documentation Style
Guidelines](https://developers.google.com/style) — for example, it
doesn’t use _i.e._ or _e.g._, and it avoids _I_ and _we_ (first person).
- [x] This PR uses [semantic line
breaks](https://github.com/dart-lang/site-shared/blob/main/doc/writing-for-dart-and-flutter-websites.md#semantic-line-breaks)
of 80 characters or fewer.
@RoarGronmo
Copy link

From which version will it apply ?

@RoarGronmo
Copy link

Will you update the documentation here also ?

@mdebbar
Copy link
Contributor Author
mdebbar commented Jun 7, 2024

From which version will it apply ?

The change hasn't landed yet, so I can't tell for sure.

Will you update the documentation here also ?

Yes, that documentation is changing here: flutter/website#10722

auto-submit bot pushed a commit that referenced this issue Jun 10, 2024
…9773)

- When `--web-renderer` is omitted, keep the value `null` until it later materializes to either `canvaskit` or `skwasm`.
- No more hardcoded defaults anywhere. We use `WebRendererMode.defaultForJs/defaultForWasm` instead.
- When in `--wasm` mode, the JS fallback is now `canvaskit` instead of `auto`.
- Add test for defaulting to `skwasm` when `--wasm` is enabled.

Fixes #149826
@kevmoo
Copy link
Contributor
kevmoo commented Jun 20, 2024

Copy link
github-actions bot commented Jul 5, 2024

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
c: API break Backwards-incompatible API changes e: web_canvaskit CanvasKit (a.k.a. Skia-on-WebGL) rendering backend for Web e: web_html HTML rendering backend for Web P1 High-priority issues at the top of the work list platform-web Web applications specifically team-web Owned by Web platform team tool Affects the "flutter" command-line tool. See also t: labels. triaged-web Triaged by Web platform team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants