[web] Remove dependency on 'profiling' subfolder of canvaskit. (flutter/engine#38169)
This commit is contained in:
@@ -173,15 +173,8 @@ Future<void> copyCanvasKitFiles({bool useLocalCanvasKit = false}) async {
|
||||
targetDir.path,
|
||||
pathlib.basename(file.path),
|
||||
));
|
||||
final io.File profileTargetFile = io.File(pathlib.join(
|
||||
targetDir.path,
|
||||
'profiling',
|
||||
pathlib.basename(file.path),
|
||||
));
|
||||
await normalTargetFile.create(recursive: true);
|
||||
await profileTargetFile.create(recursive: true);
|
||||
await file.copy(normalTargetFile.path);
|
||||
await file.copy(profileTargetFile.path);
|
||||
}
|
||||
} else {
|
||||
final io.Directory canvasKitDir = io.Directory(pathlib.join(
|
||||
|
||||
@@ -19,7 +19,6 @@ import 'package:ui/ui.dart' as ui;
|
||||
|
||||
import '../configuration.dart';
|
||||
import '../dom.dart';
|
||||
import '../initialization.dart';
|
||||
import '../profiler.dart';
|
||||
|
||||
/// Entrypoint into the CanvasKit API.
|
||||
@@ -2662,8 +2661,7 @@ void patchCanvasKitModule(DomHTMLScriptElement canvasKitScript) {
|
||||
domDocument.head!.appendChild(canvasKitScript);
|
||||
}
|
||||
|
||||
String get canvasKitBuildUrl =>
|
||||
configuration.canvasKitBaseUrl + (kProfileMode ? 'profiling/' : '');
|
||||
String get canvasKitBuildUrl => configuration.canvasKitBaseUrl;
|
||||
String get canvasKitJavaScriptBindingsUrl =>
|
||||
'${canvasKitBuildUrl}canvaskit.js';
|
||||
String canvasKitWasmModuleUrl(String canvasKitBase, String file) =>
|
||||
|
||||
@@ -160,10 +160,8 @@ class FlutterConfiguration {
|
||||
///
|
||||
/// The expected directory structure nested under this URL is as follows:
|
||||
///
|
||||
/// /canvaskit.js - the release build of CanvasKit JS API bindings
|
||||
/// /canvaskit.wasm - the release build of CanvasKit WASM module
|
||||
/// /profiling/canvaskit.js - the profile build of CanvasKit JS API bindings
|
||||
/// /profiling/canvaskit.wasm - the profile build of CanvasKit WASM module
|
||||
/// /canvaskit.js - the build of CanvasKit JS API bindings
|
||||
/// /canvaskit.wasm - the build of CanvasKit WASM module
|
||||
///
|
||||
/// The base URL can be overridden using the `FLUTTER_WEB_CANVASKIT_URL`
|
||||
/// environment variable or using the configuration API for JavaScript.
|
||||
|
||||
Reference in New Issue
Block a user