From 845947d94662afc57b01a7b0f53221f7e1570eeb Mon Sep 17 00:00:00 2001 From: Mouad Debbar Date: Fri, 31 Mar 2023 11:09:14 -0400 Subject: [PATCH 1/3] Document the new canvasKitVariant runtime configuration --- src/development/platform-integration/web/initialization.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/development/platform-integration/web/initialization.md b/src/development/platform-integration/web/initialization.md index 26d83f02d34..78316afecb0 100644 --- a/src/development/platform-integration/web/initialization.md +++ b/src/development/platform-integration/web/initialization.md @@ -130,6 +130,7 @@ You can pass in the following (optional) parameters: | Name | Description | Dart Type | |-|-|-| |`canvasKitBaseUrl`| The base URL from where `canvaskit.wasm` is downloaded. |`String`| +|`canvasKitVariant`| The variant of CanvasKit to be downloaded. Available options are:

1. "auto": Chooses the most optimal variant for the browser (this is the default).

2. "full": Downloads the full variant of CanvasKit that works in all browsers.

3. "chromium": Downloads a smaller variant of CanvasKit that takes advantage of APIs that are only available in Chromium (**_WARNING_**: don't use this option unless you know what you are doing. If you use it, your app will break on non-Chromium 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`| From 1f3b1e6a0244f970d98e396b9b5017014dc3b100 Mon Sep 17 00:00:00 2001 From: Mouad Debbar Date: Fri, 31 Mar 2023 11:17:11 -0400 Subject: [PATCH 2/3] clearer --- src/development/platform-integration/web/initialization.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/development/platform-integration/web/initialization.md b/src/development/platform-integration/web/initialization.md index 78316afecb0..d79ad2e42dc 100644 --- a/src/development/platform-integration/web/initialization.md +++ b/src/development/platform-integration/web/initialization.md @@ -130,7 +130,7 @@ You can pass in the following (optional) parameters: | Name | Description | Dart Type | |-|-|-| |`canvasKitBaseUrl`| The base URL from where `canvaskit.wasm` is downloaded. |`String`| -|`canvasKitVariant`| The variant of CanvasKit to be downloaded. Available options are:

1. "auto": Chooses the most optimal variant for the browser (this is the default).

2. "full": Downloads the full variant of CanvasKit that works in all browsers.

3. "chromium": Downloads a smaller variant of CanvasKit that takes advantage of APIs that are only available in Chromium (**_WARNING_**: don't use this option unless you know what you are doing. If you use it, your app will break on non-Chromium browsers). |`String`| +|`canvasKitVariant`| The variant of CanvasKit to be downloaded. Available options are:

1. "auto": Chooses the most optimal variant for the browser (this is the default).

2. "full": Downloads the full variant of CanvasKit that works in all browsers.

3. "chromium": Downloads a smaller variant of CanvasKit that takes advantage of APIs that are only available in Chromium (**_WARNING_**: don't use the "chromium" option unless you know what you are doing. If you use it, your app will break on non-Chromium 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`| From bc9f743d2c156cd64891f28358253b664ed74f54 Mon Sep 17 00:00:00 2001 From: Mouad Debbar Date: Wed, 12 Apr 2023 12:57:13 -0400 Subject: [PATCH 3/3] Update src/development/platform-integration/web/initialization.md Co-authored-by: Anthony Sansone --- src/development/platform-integration/web/initialization.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/development/platform-integration/web/initialization.md b/src/development/platform-integration/web/initialization.md index d79ad2e42dc..25f8133e04c 100644 --- a/src/development/platform-integration/web/initialization.md +++ b/src/development/platform-integration/web/initialization.md @@ -130,7 +130,7 @@ You can pass in the following (optional) parameters: | Name | Description | Dart Type | |-|-|-| |`canvasKitBaseUrl`| The base URL from where `canvaskit.wasm` is downloaded. |`String`| -|`canvasKitVariant`| The variant of CanvasKit to be downloaded. Available options are:

1. "auto": Chooses the most optimal variant for the browser (this is the default).

2. "full": Downloads the full variant of CanvasKit that works in all browsers.

3. "chromium": Downloads a smaller variant of CanvasKit that takes advantage of APIs that are only available in Chromium (**_WARNING_**: don't use the "chromium" option unless you know what you are doing. If you use it, your app will break on non-Chromium browsers). |`String`| +|`canvasKitVariant`| The variant of CanvasKit to be downloaded. Available options are:

1. `auto`: Chooses the most optimal variant for the browser. The option defaults to this value.

2. `full`: Downloads the full variant of CanvasKit that works in all browsers.

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`|