Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Default the CanvasKit base URL to local artifacts. #40717

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
28 changes: 0 additions & 28 deletions lib/web_ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,34 +214,6 @@ Resources:
2. LUCI web [recipe][5]
3. More general reading on CIPD packages [link][6]

### Rolling CanvasKit

CanvasKit is versioned separately from Skia and rolled manually. Flutter
consumes a pre-built CanvasKit provided by the Skia team, currently hosted on
unpkg.com. When a new version of CanvasKit is available (check
https://www.npmjs.com/package/canvaskit-wasm or consult the Skia team
directly), follow these steps to roll to the new version:

- Make sure you have `depot_tools` installed (if you are regularly hacking on
the engine code, you probably do).
- If not already authenticated with CIPD, run `cipd auth-login` and follow
instructions (this step requires sufficient privileges; file a github
infra ticket queue issue: https://github.com/flutter/flutter/wiki/Infra-Ticket-Queue
to get access)
- Edit `dev/canvaskit_lock.yaml` and update the value of `canvaskit_version`
to the new version.
- Run `dart dev/canvaskit_roller.dart` and make sure it completes successfully.
The script uploads the new version of CanvasKit to the
`flutter/web/canvaskit_bundle` CIPD package, and writes the CIPD package
instance ID to the DEPS file.
- Rerun `gclient sync` and do a clean build to test that the new version is
picked up.
- Send a pull request containing the above file changes. If the new version
contains breaking changes, the PR must also contain corresponding fixes.

If you have questions, contact the Flutter Web team on Flutter Discord on the
#hackers-web-🌍 channel.

### Rolling Noto Font Data

In order to generate new data for the Noto fallback fonts, you will need
Expand Down
4 changes: 0 additions & 4 deletions lib/web_ui/dev/canvaskit_lock.yaml

This file was deleted.

169 changes: 0 additions & 169 deletions lib/web_ui/dev/canvaskit_roller.dart

This file was deleted.

7 changes: 1 addition & 6 deletions lib/web_ui/lib/src/engine/configuration.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@ import 'package:meta/meta.dart';
import 'canvaskit/renderer.dart';
import 'dom.dart';

/// The version of CanvasKit used by the web engine by default.
// DO NOT EDIT THE NEXT LINE OF CODE MANUALLY
// See `lib/web_ui/README.md` for how to roll CanvasKit to a new version.
const String _canvaskitVersion = '0.38.0';

/// The Web Engine configuration for the current application.
FlutterConfiguration get configuration =>
_configuration ??= FlutterConfiguration.legacy(_jsConfiguration);
Expand Down Expand Up @@ -183,7 +178,7 @@ class FlutterConfiguration {
String get canvasKitBaseUrl => _configuration?.canvasKitBaseUrl ?? _defaultCanvasKitBaseUrl;
static const String _defaultCanvasKitBaseUrl = String.fromEnvironment(
'FLUTTER_WEB_CANVASKIT_URL',
defaultValue: 'https://unpkg.com/canvaskit-wasm@$_canvaskitVersion/bin/',
defaultValue: 'canvaskit/',
);

/// The variant of CanvasKit to download.
Expand Down