Skip to content

Commit e82c589

Browse files
authored
[web] Change --web-renderer default from auto to canvaskit (#10714)
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.
1 parent 0799166 commit e82c589

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

src/content/platform-integration/web/renderers.md

+17-17
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,25 @@ When running and building apps for the web, you can choose between two different
77
renderers. This page describes both renderers and how to choose the best one for
88
your needs. The two renderers are:
99

10-
**HTML renderer**
11-
: This renderer, which has a smaller download size than the CanvasKit renderer, uses a combination of
12-
HTML elements, CSS, Canvas elements, and SVG elements.
13-
1410
**CanvasKit renderer**
1511
: This renderer is fully consistent with Flutter mobile and desktop, has faster
1612
performance with higher widget density, but adds about 1.5MB in download size.
1713
[CanvasKit][canvaskit] uses WebGL to render Skia paint commands.
1814

15+
**HTML renderer**
16+
: This renderer, which has a smaller download size than the CanvasKit renderer, uses a combination of
17+
HTML elements, CSS, Canvas elements, and SVG elements.
18+
1919
## Command line options
2020

21-
The `--web-renderer` command line option takes one of three values, `auto`,
22-
`html`, or `canvaskit`.
21+
The `--web-renderer` command line option takes one of three values, `canvaskit`,
22+
`html`, or `auto`.
2323

24-
* `auto` (default) - automatically chooses which renderer to use. This option
24+
* `canvaskit` (default) - always use the CanvasKit renderer
25+
* `html` - always use the HTML renderer
26+
* `auto` - automatically chooses which renderer to use. This option
2527
chooses the HTML renderer when the app is running in a mobile browser, and
2628
CanvasKit renderer when the app is running in a desktop browser.
27-
* `html` - always use the HTML renderer
28-
* `canvaskit` - always use the CanvasKit renderer
2929

3030
This flag can be used with the `run` or `build` subcommands. For example:
3131

@@ -86,33 +86,33 @@ check out [Customizing web app initialization][web-app-init].
8686

8787
## Choosing which option to use
8888

89-
Choose the `auto` option (default) if you are optimizing for download size on
90-
mobile browsers and optimizing for performance on desktop browsers.
89+
Choose the `canvaskit` option (default) if you are prioritizing performance and
90+
pixel-perfect consistency on both desktop and mobile browsers.
9191

9292
Choose the `html` option if you are optimizing download size over performance on
9393
both desktop and mobile browsers.
9494

95-
Choose the `canvaskit` option if you are prioritizing performance and
96-
pixel-perfect consistency on both desktop and mobile browsers.
95+
Choose the `auto` option if you are optimizing for download size on
96+
mobile browsers and optimizing for performance on desktop browsers.
9797

9898
## Examples
9999

100-
Run in Chrome using the default renderer option (`auto`):
100+
Run in Chrome using the default renderer option (`canvaskit`):
101101

102102
```console
103103
flutter run -d chrome
104104
```
105105

106-
Build your app in release mode, using the default (auto) option:
106+
Build your app in release mode, using the default (`canvaskit`) option:
107107

108108
```console
109109
flutter build web --release
110110
```
111111

112-
Build your app in release mode, using just the CanvasKit renderer:
112+
Build your app in release mode, using the `auto` renderer option:
113113

114114
```console
115-
flutter build web --web-renderer canvaskit --release
115+
flutter build web --web-renderer auto --release
116116
```
117117

118118
Run your app in profile mode using the HTML renderer:

0 commit comments

Comments
 (0)