Skip to content

Commit

Permalink
Document the new canvasKitVariant runtime configuration (#8475)
Browse files Browse the repository at this point in the history
Add documentation for the new
[`canvasKitVariant`](https://github.com/flutter/engine/blob/0776f38b87137ad2535d77e91a79b8b6c80f16fb/lib/web_ui/lib/src/engine/configuration.dart#L221-L224)
runtime configuration.

Closes flutter/flutter#123048

## 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/master/doc/writing-for-dart-and-flutter-websites.md#semantic-line-breaks)
of 80 characters or fewer.

---------

Co-authored-by: Anthony Sansone <[email protected]>
  • Loading branch information
mdebbar and atsansone committed Apr 21, 2023
1 parent b617184 commit 5c9a7b3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/development/platform-integration/web/initialization.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ You can pass in the following (optional) parameters:
| Name | Description | Dart&nbsp;Type |
|-|-|-|
|`canvasKitBaseUrl`| The base URL from where `canvaskit.wasm` is downloaded. |`String`|
|`canvasKitVariant`| The variant of CanvasKit to be downloaded. Available options are:<br><br>1. `auto`: Chooses the most optimal variant for the browser. The option defaults to this value.<br><br>2. `full`: Downloads the full variant of CanvasKit that works in all browsers.<br><br>3. `chromium`: Downloads a smaller variant of CanvasKit that uses APIs compatible with Chromium. **_Warning_**: Don't use the `chromium` option unless you plan on only using Chromium-based browsers. |`String`|
|`canvasKitForceCpuOnly`| When `true`, forces CPU-only rendering in CanvasKit (the engine won't use WebGL). |`bool`|
|`canvasKitMaximumSurfaces`| The maximum number of overlay surfaces that the CanvasKit renderer can use. |`double`|
|`debugShowSemanticNodes`| If `true`, Flutter visibly renders the semantics tree onscreen (for debugging). |`bool`|
Expand Down

0 comments on commit 5c9a7b3

Please sign in to comment.