Skip to content

Commit

Permalink
[web] Remove dependency on 'profiling' subfolder of canvaskit. (flutt…
Browse files Browse the repository at this point in the history
  • Loading branch information
Harry Terkelsen authored and Ricardo Amador committed Jan 25, 2023
1 parent 888ad3c commit 3d437eb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 14 deletions.
7 changes: 0 additions & 7 deletions lib/web_ui/dev/steps/compile_tests_step.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 1 addition & 3 deletions lib/web_ui/lib/src/engine/canvaskit/canvaskit_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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) =>
Expand Down
6 changes: 2 additions & 4 deletions lib/web_ui/lib/src/engine/configuration.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 3d437eb

Please sign in to comment.