[canvaskit] Add full build to npm release.
Also rename //modules/canvaskit/canvaskit to //modules/canvaskit/npm_build to make it more clear the purpose of that folder (what we ship to npm and stage our builds for local testing). Bug: skia:11203 Change-Id: I4299ded97d14f4155c36798d60e88a660ce6fe6a Reviewed-on: https://skia-review.googlesource.com/c/skia/+/372392 Reviewed-by: Kevin Lubick <kjlubick@google.com>
This commit is contained in:
parent
5364864cce
commit
3b760b6fa8
@ -107,10 +107,10 @@
|
||||
"ensure-directory",
|
||||
"--mode",
|
||||
"0777",
|
||||
"[START_DIR]/skia/modules/canvaskit/canvaskit/bin"
|
||||
"[START_DIR]/skia/modules/canvaskit/npm_build/bin"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.mkdirs [START_DIR]/skia/modules/canvaskit/canvaskit/bin",
|
||||
"name": "Docker setup.mkdirs [START_DIR]/skia/modules/canvaskit/npm_build/bin",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
@ -124,10 +124,10 @@
|
||||
"/path/to/tmp/json",
|
||||
"copy",
|
||||
"[START_DIR]/build/canvaskit.wasm",
|
||||
"[START_DIR]/skia/modules/canvaskit/canvaskit/bin/canvaskit.wasm"
|
||||
"[START_DIR]/skia/modules/canvaskit/npm_build/bin/canvaskit.wasm"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.cp [START_DIR]/build/canvaskit.wasm [START_DIR]/skia/modules/canvaskit/canvaskit/bin/canvaskit.wasm",
|
||||
"name": "Docker setup.cp [START_DIR]/build/canvaskit.wasm [START_DIR]/skia/modules/canvaskit/npm_build/bin/canvaskit.wasm",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
@ -136,10 +136,10 @@
|
||||
"cmd": [
|
||||
"chmod",
|
||||
"644",
|
||||
"[START_DIR]/skia/modules/canvaskit/canvaskit/bin/canvaskit.wasm"
|
||||
"[START_DIR]/skia/modules/canvaskit/npm_build/bin/canvaskit.wasm"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.chmod 644 [START_DIR]/skia/modules/canvaskit/canvaskit/bin/canvaskit.wasm",
|
||||
"name": "Docker setup.chmod 644 [START_DIR]/skia/modules/canvaskit/npm_build/bin/canvaskit.wasm",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
@ -154,10 +154,10 @@
|
||||
"ensure-directory",
|
||||
"--mode",
|
||||
"0777",
|
||||
"[START_DIR]/skia/modules/canvaskit/canvaskit/bin"
|
||||
"[START_DIR]/skia/modules/canvaskit/npm_build/bin"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.mkdirs [START_DIR]/skia/modules/canvaskit/canvaskit/bin (2)",
|
||||
"name": "Docker setup.mkdirs [START_DIR]/skia/modules/canvaskit/npm_build/bin (2)",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
@ -171,10 +171,10 @@
|
||||
"/path/to/tmp/json",
|
||||
"copy",
|
||||
"[START_DIR]/build/canvaskit.js",
|
||||
"[START_DIR]/skia/modules/canvaskit/canvaskit/bin/canvaskit.js"
|
||||
"[START_DIR]/skia/modules/canvaskit/npm_build/bin/canvaskit.js"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.cp [START_DIR]/build/canvaskit.js [START_DIR]/skia/modules/canvaskit/canvaskit/bin/canvaskit.js",
|
||||
"name": "Docker setup.cp [START_DIR]/build/canvaskit.js [START_DIR]/skia/modules/canvaskit/npm_build/bin/canvaskit.js",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
@ -183,10 +183,10 @@
|
||||
"cmd": [
|
||||
"chmod",
|
||||
"644",
|
||||
"[START_DIR]/skia/modules/canvaskit/canvaskit/bin/canvaskit.js"
|
||||
"[START_DIR]/skia/modules/canvaskit/npm_build/bin/canvaskit.js"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.chmod 644 [START_DIR]/skia/modules/canvaskit/canvaskit/bin/canvaskit.js",
|
||||
"name": "Docker setup.chmod 644 [START_DIR]/skia/modules/canvaskit/npm_build/bin/canvaskit.js",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
|
@ -107,10 +107,10 @@
|
||||
"ensure-directory",
|
||||
"--mode",
|
||||
"0777",
|
||||
"[START_DIR]/skia/modules/canvaskit/canvaskit/bin"
|
||||
"[START_DIR]/skia/modules/canvaskit/npm_build/bin"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.mkdirs [START_DIR]/skia/modules/canvaskit/canvaskit/bin",
|
||||
"name": "Docker setup.mkdirs [START_DIR]/skia/modules/canvaskit/npm_build/bin",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
@ -124,10 +124,10 @@
|
||||
"/path/to/tmp/json",
|
||||
"copy",
|
||||
"[START_DIR]/build/canvaskit.wasm",
|
||||
"[START_DIR]/skia/modules/canvaskit/canvaskit/bin/canvaskit.wasm"
|
||||
"[START_DIR]/skia/modules/canvaskit/npm_build/bin/canvaskit.wasm"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.cp [START_DIR]/build/canvaskit.wasm [START_DIR]/skia/modules/canvaskit/canvaskit/bin/canvaskit.wasm",
|
||||
"name": "Docker setup.cp [START_DIR]/build/canvaskit.wasm [START_DIR]/skia/modules/canvaskit/npm_build/bin/canvaskit.wasm",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
@ -136,10 +136,10 @@
|
||||
"cmd": [
|
||||
"chmod",
|
||||
"644",
|
||||
"[START_DIR]/skia/modules/canvaskit/canvaskit/bin/canvaskit.wasm"
|
||||
"[START_DIR]/skia/modules/canvaskit/npm_build/bin/canvaskit.wasm"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.chmod 644 [START_DIR]/skia/modules/canvaskit/canvaskit/bin/canvaskit.wasm",
|
||||
"name": "Docker setup.chmod 644 [START_DIR]/skia/modules/canvaskit/npm_build/bin/canvaskit.wasm",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
@ -154,10 +154,10 @@
|
||||
"ensure-directory",
|
||||
"--mode",
|
||||
"0777",
|
||||
"[START_DIR]/skia/modules/canvaskit/canvaskit/bin"
|
||||
"[START_DIR]/skia/modules/canvaskit/npm_build/bin"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.mkdirs [START_DIR]/skia/modules/canvaskit/canvaskit/bin (2)",
|
||||
"name": "Docker setup.mkdirs [START_DIR]/skia/modules/canvaskit/npm_build/bin (2)",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
@ -171,10 +171,10 @@
|
||||
"/path/to/tmp/json",
|
||||
"copy",
|
||||
"[START_DIR]/build/canvaskit.js",
|
||||
"[START_DIR]/skia/modules/canvaskit/canvaskit/bin/canvaskit.js"
|
||||
"[START_DIR]/skia/modules/canvaskit/npm_build/bin/canvaskit.js"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.cp [START_DIR]/build/canvaskit.js [START_DIR]/skia/modules/canvaskit/canvaskit/bin/canvaskit.js",
|
||||
"name": "Docker setup.cp [START_DIR]/build/canvaskit.js [START_DIR]/skia/modules/canvaskit/npm_build/bin/canvaskit.js",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
@ -183,10 +183,10 @@
|
||||
"cmd": [
|
||||
"chmod",
|
||||
"644",
|
||||
"[START_DIR]/skia/modules/canvaskit/canvaskit/bin/canvaskit.js"
|
||||
"[START_DIR]/skia/modules/canvaskit/npm_build/bin/canvaskit.js"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.chmod 644 [START_DIR]/skia/modules/canvaskit/canvaskit/bin/canvaskit.js",
|
||||
"name": "Docker setup.chmod 644 [START_DIR]/skia/modules/canvaskit/npm_build/bin/canvaskit.js",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
|
@ -28,10 +28,10 @@ def RunSteps(api):
|
||||
checkout_root = api.path['start_dir']
|
||||
out_dir = api.vars.swarming_out_dir
|
||||
|
||||
# The karma script is configured to look in ./canvaskit/bin/ for
|
||||
# The karma script is configured to look in ./npm_build/bin/ for
|
||||
# the test files to load, so we must copy them there (see Set up for docker).
|
||||
copy_dest = checkout_root.join('skia', 'modules', 'canvaskit',
|
||||
'canvaskit', 'bin')
|
||||
'npm_build', 'bin')
|
||||
base_dir = api.vars.build_dir
|
||||
copies = {
|
||||
base_dir.join('canvaskit.js'): copy_dest.join('canvaskit.js'),
|
||||
|
@ -9,7 +9,7 @@
|
||||
"ensure-directory",
|
||||
"--mode",
|
||||
"0777",
|
||||
"[START_DIR]/skia/modules/canvaskit/canvaskit/bin"
|
||||
"[START_DIR]/skia/modules/canvaskit/npm_build/bin"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "mkdirs copy_dest"
|
||||
@ -122,10 +122,10 @@
|
||||
"ensure-directory",
|
||||
"--mode",
|
||||
"0777",
|
||||
"[START_DIR]/skia/modules/canvaskit/canvaskit/bin"
|
||||
"[START_DIR]/skia/modules/canvaskit/npm_build/bin"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.mkdirs [START_DIR]/skia/modules/canvaskit/canvaskit/bin",
|
||||
"name": "Docker setup.mkdirs [START_DIR]/skia/modules/canvaskit/npm_build/bin",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
@ -139,10 +139,10 @@
|
||||
"/path/to/tmp/json",
|
||||
"copy",
|
||||
"[START_DIR]/build/canvaskit.wasm",
|
||||
"[START_DIR]/skia/modules/canvaskit/canvaskit/bin/canvaskit.wasm"
|
||||
"[START_DIR]/skia/modules/canvaskit/npm_build/bin/canvaskit.wasm"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.cp [START_DIR]/build/canvaskit.wasm [START_DIR]/skia/modules/canvaskit/canvaskit/bin/canvaskit.wasm",
|
||||
"name": "Docker setup.cp [START_DIR]/build/canvaskit.wasm [START_DIR]/skia/modules/canvaskit/npm_build/bin/canvaskit.wasm",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
@ -151,10 +151,10 @@
|
||||
"cmd": [
|
||||
"chmod",
|
||||
"644",
|
||||
"[START_DIR]/skia/modules/canvaskit/canvaskit/bin/canvaskit.wasm"
|
||||
"[START_DIR]/skia/modules/canvaskit/npm_build/bin/canvaskit.wasm"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.chmod 644 [START_DIR]/skia/modules/canvaskit/canvaskit/bin/canvaskit.wasm",
|
||||
"name": "Docker setup.chmod 644 [START_DIR]/skia/modules/canvaskit/npm_build/bin/canvaskit.wasm",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
@ -169,10 +169,10 @@
|
||||
"ensure-directory",
|
||||
"--mode",
|
||||
"0777",
|
||||
"[START_DIR]/skia/modules/canvaskit/canvaskit/bin"
|
||||
"[START_DIR]/skia/modules/canvaskit/npm_build/bin"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.mkdirs [START_DIR]/skia/modules/canvaskit/canvaskit/bin (2)",
|
||||
"name": "Docker setup.mkdirs [START_DIR]/skia/modules/canvaskit/npm_build/bin (2)",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
@ -186,10 +186,10 @@
|
||||
"/path/to/tmp/json",
|
||||
"copy",
|
||||
"[START_DIR]/build/canvaskit.js",
|
||||
"[START_DIR]/skia/modules/canvaskit/canvaskit/bin/canvaskit.js"
|
||||
"[START_DIR]/skia/modules/canvaskit/npm_build/bin/canvaskit.js"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.cp [START_DIR]/build/canvaskit.js [START_DIR]/skia/modules/canvaskit/canvaskit/bin/canvaskit.js",
|
||||
"name": "Docker setup.cp [START_DIR]/build/canvaskit.js [START_DIR]/skia/modules/canvaskit/npm_build/bin/canvaskit.js",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
@ -198,10 +198,10 @@
|
||||
"cmd": [
|
||||
"chmod",
|
||||
"644",
|
||||
"[START_DIR]/skia/modules/canvaskit/canvaskit/bin/canvaskit.js"
|
||||
"[START_DIR]/skia/modules/canvaskit/npm_build/bin/canvaskit.js"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.chmod 644 [START_DIR]/skia/modules/canvaskit/canvaskit/bin/canvaskit.js",
|
||||
"name": "Docker setup.chmod 644 [START_DIR]/skia/modules/canvaskit/npm_build/bin/canvaskit.js",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
|
@ -9,7 +9,7 @@
|
||||
"ensure-directory",
|
||||
"--mode",
|
||||
"0777",
|
||||
"[START_DIR]/skia/modules/canvaskit/canvaskit/bin"
|
||||
"[START_DIR]/skia/modules/canvaskit/npm_build/bin"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "mkdirs copy_dest"
|
||||
@ -122,10 +122,10 @@
|
||||
"ensure-directory",
|
||||
"--mode",
|
||||
"0777",
|
||||
"[START_DIR]/skia/modules/canvaskit/canvaskit/bin"
|
||||
"[START_DIR]/skia/modules/canvaskit/npm_build/bin"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.mkdirs [START_DIR]/skia/modules/canvaskit/canvaskit/bin",
|
||||
"name": "Docker setup.mkdirs [START_DIR]/skia/modules/canvaskit/npm_build/bin",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
@ -139,10 +139,10 @@
|
||||
"/path/to/tmp/json",
|
||||
"copy",
|
||||
"[START_DIR]/build/canvaskit.wasm",
|
||||
"[START_DIR]/skia/modules/canvaskit/canvaskit/bin/canvaskit.wasm"
|
||||
"[START_DIR]/skia/modules/canvaskit/npm_build/bin/canvaskit.wasm"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.cp [START_DIR]/build/canvaskit.wasm [START_DIR]/skia/modules/canvaskit/canvaskit/bin/canvaskit.wasm",
|
||||
"name": "Docker setup.cp [START_DIR]/build/canvaskit.wasm [START_DIR]/skia/modules/canvaskit/npm_build/bin/canvaskit.wasm",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
@ -151,10 +151,10 @@
|
||||
"cmd": [
|
||||
"chmod",
|
||||
"644",
|
||||
"[START_DIR]/skia/modules/canvaskit/canvaskit/bin/canvaskit.wasm"
|
||||
"[START_DIR]/skia/modules/canvaskit/npm_build/bin/canvaskit.wasm"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.chmod 644 [START_DIR]/skia/modules/canvaskit/canvaskit/bin/canvaskit.wasm",
|
||||
"name": "Docker setup.chmod 644 [START_DIR]/skia/modules/canvaskit/npm_build/bin/canvaskit.wasm",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
@ -169,10 +169,10 @@
|
||||
"ensure-directory",
|
||||
"--mode",
|
||||
"0777",
|
||||
"[START_DIR]/skia/modules/canvaskit/canvaskit/bin"
|
||||
"[START_DIR]/skia/modules/canvaskit/npm_build/bin"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.mkdirs [START_DIR]/skia/modules/canvaskit/canvaskit/bin (2)",
|
||||
"name": "Docker setup.mkdirs [START_DIR]/skia/modules/canvaskit/npm_build/bin (2)",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
@ -186,10 +186,10 @@
|
||||
"/path/to/tmp/json",
|
||||
"copy",
|
||||
"[START_DIR]/build/canvaskit.js",
|
||||
"[START_DIR]/skia/modules/canvaskit/canvaskit/bin/canvaskit.js"
|
||||
"[START_DIR]/skia/modules/canvaskit/npm_build/bin/canvaskit.js"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.cp [START_DIR]/build/canvaskit.js [START_DIR]/skia/modules/canvaskit/canvaskit/bin/canvaskit.js",
|
||||
"name": "Docker setup.cp [START_DIR]/build/canvaskit.js [START_DIR]/skia/modules/canvaskit/npm_build/bin/canvaskit.js",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
@ -198,10 +198,10 @@
|
||||
"cmd": [
|
||||
"chmod",
|
||||
"644",
|
||||
"[START_DIR]/skia/modules/canvaskit/canvaskit/bin/canvaskit.js"
|
||||
"[START_DIR]/skia/modules/canvaskit/npm_build/bin/canvaskit.js"
|
||||
],
|
||||
"infra_step": true,
|
||||
"name": "Docker setup.chmod 644 [START_DIR]/skia/modules/canvaskit/canvaskit/bin/canvaskit.js",
|
||||
"name": "Docker setup.chmod 644 [START_DIR]/skia/modules/canvaskit/npm_build/bin/canvaskit.js",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_NEST_LEVEL@1@@@"
|
||||
]
|
||||
|
@ -28,10 +28,10 @@ def RunSteps(api):
|
||||
checkout_root = api.path['start_dir']
|
||||
out_dir = api.vars.swarming_out_dir
|
||||
|
||||
# The karma script is configured to look in ./canvaskit/bin/ for
|
||||
# The karma script is configured to look in ./npm_build/bin/ for
|
||||
# the test files to load, so we must copy them there (see Set up for docker).
|
||||
copy_dest = checkout_root.join('skia', 'modules', 'canvaskit',
|
||||
'canvaskit', 'bin')
|
||||
'npm_build', 'bin')
|
||||
api.file.ensure_directory('mkdirs copy_dest', copy_dest, mode=0777)
|
||||
base_dir = api.vars.build_dir
|
||||
copies = {
|
||||
|
2
modules/canvaskit/.gitignore
vendored
2
modules/canvaskit/.gitignore
vendored
@ -2,4 +2,4 @@ package-lock.json
|
||||
fonts/*.cpp
|
||||
coverage/*
|
||||
# Don't check in this copy. It's just for publishing to npm.
|
||||
canvaskit/CHANGELOG.md
|
||||
npm_build/CHANGELOG.md
|
@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
- A full build of CanvasKit is now in /bin/full.
|
||||
- `CanvasKit.rt_effect` to test if the RuntimeEffect code was compiled in.
|
||||
|
||||
### Breaking
|
||||
- The `ShapedText` type has been removed. Clients who want ShapedText should use the
|
||||
Paragraph APIs.
|
||||
@ -15,6 +19,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
Paragraph APIs or `Font.getGlyphWidths` instead (the latter does no shaping).
|
||||
- `Font.getWidths`, which had been previously deprecated. Clients should use `Font.getGlyphWidths`.
|
||||
|
||||
### Type Changes (index.d.ts)
|
||||
- Documentation added for `managed_skottie`, `particles`, and `skottie` feature constants.
|
||||
|
||||
## [0.24.0] - 2021-02-18
|
||||
|
||||
### Added
|
||||
|
@ -1,79 +1,85 @@
|
||||
clean:
|
||||
rm -rf ../../out/canvaskit_wasm
|
||||
rm -rf ./canvaskit/bin
|
||||
rm -rf ./npm_build/bin
|
||||
$(MAKE) release
|
||||
|
||||
release:
|
||||
# Does an incremental build where possible.
|
||||
./compile.sh
|
||||
mkdir -p ./canvaskit/bin
|
||||
cp ../../out/canvaskit_wasm/canvaskit.js ./canvaskit/bin
|
||||
cp ../../out/canvaskit_wasm/canvaskit.wasm ./canvaskit/bin
|
||||
mkdir -p ./npm_build/bin
|
||||
cp ../../out/canvaskit_wasm/canvaskit.js ./npm_build/bin
|
||||
cp ../../out/canvaskit_wasm/canvaskit.wasm ./npm_build/bin
|
||||
|
||||
release_cpu:
|
||||
# Does an incremental build where possible.
|
||||
./compile.sh cpu_only
|
||||
mkdir -p ./canvaskit/bin
|
||||
cp ../../out/canvaskit_wasm/canvaskit.js ./canvaskit/bin
|
||||
cp ../../out/canvaskit_wasm/canvaskit.wasm ./canvaskit/bin
|
||||
mkdir -p ./npm_build/bin
|
||||
cp ../../out/canvaskit_wasm/canvaskit.js ./npm_build/bin
|
||||
cp ../../out/canvaskit_wasm/canvaskit.wasm ./npm_build/bin
|
||||
|
||||
release_viewer:
|
||||
# Does an incremental build where possible.
|
||||
./compile.sh viewer
|
||||
mkdir -p ./canvaskit/bin
|
||||
cp ../../out/canvaskit_wasm/canvaskit.js ./canvaskit/bin
|
||||
cp ../../out/canvaskit_wasm/canvaskit.wasm ./canvaskit/bin
|
||||
mkdir -p ./npm_build/bin
|
||||
cp ../../out/canvaskit_wasm/canvaskit.js ./npm_build/bin
|
||||
cp ../../out/canvaskit_wasm/canvaskit.wasm ./npm_build/bin
|
||||
|
||||
debug:
|
||||
# Does an incremental build where possible.
|
||||
./compile.sh debug
|
||||
mkdir -p ./canvaskit/bin
|
||||
cp ../../out/canvaskit_wasm_debug/canvaskit.js ./canvaskit/bin
|
||||
cp ../../out/canvaskit_wasm_debug/canvaskit.wasm ./canvaskit/bin
|
||||
#cp ../../out/canvaskit_wasm_debug/canvaskit.wasm.map ./canvaskit/bin
|
||||
mkdir -p ./npm_build/bin
|
||||
cp ../../out/canvaskit_wasm_debug/canvaskit.js ./npm_build/bin
|
||||
cp ../../out/canvaskit_wasm_debug/canvaskit.wasm ./npm_build/bin
|
||||
#cp ../../out/canvaskit_wasm_debug/canvaskit.wasm.map ./npm_build/bin
|
||||
|
||||
debug_cpu:
|
||||
# Does an incremental build where possible.
|
||||
./compile.sh debug cpu_only
|
||||
mkdir -p ./canvaskit/bin
|
||||
cp ../../out/canvaskit_wasm_debug/canvaskit.js ./canvaskit/bin
|
||||
cp ../../out/canvaskit_wasm_debug/canvaskit.wasm ./canvaskit/bin
|
||||
#cp ../../out/canvaskit_wasm_debug/canvaskit.wasm.map ./canvaskit/bin
|
||||
mkdir -p ./npm_build/bin
|
||||
cp ../../out/canvaskit_wasm_debug/canvaskit.js ./npm_build/bin
|
||||
cp ../../out/canvaskit_wasm_debug/canvaskit.wasm ./npm_build/bin
|
||||
#cp ../../out/canvaskit_wasm_debug/canvaskit.wasm.map ./npm_build/bin
|
||||
|
||||
experimental_simd:
|
||||
# Does an incremental build where possible.
|
||||
./compile.sh simd
|
||||
mkdir -p ./canvaskit/bin
|
||||
cp ../../out/canvaskit_wasm_experimental_simd/canvaskit.js ./canvaskit/bin
|
||||
cp ../../out/canvaskit_wasm_experimental_simd/canvaskit.wasm ./canvaskit/bin
|
||||
mkdir -p ./npm_build/bin
|
||||
cp ../../out/canvaskit_wasm_experimental_simd/canvaskit.js ./npm_build/bin
|
||||
cp ../../out/canvaskit_wasm_experimental_simd/canvaskit.wasm ./npm_build/bin
|
||||
|
||||
debug_viewer:
|
||||
# Does an incremental build where possible.
|
||||
./compile.sh debug viewer
|
||||
mkdir -p ./canvaskit/bin
|
||||
cp ../../out/canvaskit_wasm_debug/canvaskit.js ./canvaskit/bin
|
||||
cp ../../out/canvaskit_wasm_debug/canvaskit.wasm ./canvaskit/bin
|
||||
mkdir -p ./npm_build/bin
|
||||
cp ../../out/canvaskit_wasm_debug/canvaskit.js ./npm_build/bin
|
||||
cp ../../out/canvaskit_wasm_debug/canvaskit.wasm ./npm_build/bin
|
||||
|
||||
profile:
|
||||
./compile.sh profiling
|
||||
mkdir -p ./canvaskit/bin
|
||||
cp ../../out/canvaskit_wasm_profile/canvaskit.js ./canvaskit/bin
|
||||
cp ../../out/canvaskit_wasm_profile/canvaskit.wasm ./canvaskit/bin
|
||||
mkdir -p ./npm_build/bin
|
||||
cp ../../out/canvaskit_wasm_profile/canvaskit.js ./npm_build/bin
|
||||
cp ../../out/canvaskit_wasm_profile/canvaskit.wasm ./npm_build/bin
|
||||
|
||||
npm:
|
||||
rm -rf ./canvaskit/bin
|
||||
mkdir -p ./canvaskit/bin
|
||||
cp ./CHANGELOG.md ./canvaskit/
|
||||
rm -rf ./npm_build/bin
|
||||
mkdir -p ./npm_build/bin
|
||||
cp ./CHANGELOG.md ./npm_build/
|
||||
|
||||
mkdir -p ./npm_build/bin/full
|
||||
./compile.sh release
|
||||
cp ../../out/canvaskit_wasm/canvaskit.js ./npm_build/bin/full
|
||||
cp ../../out/canvaskit_wasm/canvaskit.wasm ./npm_build/bin/full
|
||||
|
||||
# These features are turned off to keep code size smaller for the
|
||||
# general use case.
|
||||
./compile.sh release no_skottie no_particles no_rt_shader no_alias_font no_effects_deserialization
|
||||
cp ../../out/canvaskit_wasm/canvaskit.js ./canvaskit/bin
|
||||
cp ../../out/canvaskit_wasm/canvaskit.wasm ./canvaskit/bin
|
||||
cp ../../out/canvaskit_wasm/canvaskit.js ./npm_build/bin
|
||||
cp ../../out/canvaskit_wasm/canvaskit.wasm ./npm_build/bin
|
||||
|
||||
mkdir -p ./canvaskit/bin/profiling
|
||||
./compile.sh profiling no_skottie no_particles no_rt_shader no_alias_font no_effects_deserialization
|
||||
cp ../../out/canvaskit_wasm_profile/canvaskit.js ./canvaskit/bin/profiling
|
||||
cp ../../out/canvaskit_wasm_profile/canvaskit.wasm ./canvaskit/bin/profiling
|
||||
mkdir -p ./npm_build/bin/profiling
|
||||
./compile.sh profiling
|
||||
cp ../../out/canvaskit_wasm_profile/canvaskit.js ./npm_build/bin/profiling
|
||||
cp ../../out/canvaskit_wasm_profile/canvaskit.wasm ./npm_build/bin/profiling
|
||||
|
||||
gm_tests_debug:
|
||||
./compile_gm.sh debug
|
||||
@ -90,12 +96,12 @@ gm_tests:
|
||||
local-example:
|
||||
rm -rf node_modules/canvaskit
|
||||
mkdir -p node_modules
|
||||
ln -s ../canvaskit node_modules/canvaskit
|
||||
echo "Go check out http://localhost:8000/canvaskit/example.html"
|
||||
ln -s ../npm_build node_modules/canvaskit
|
||||
echo "Go check out http://localhost:8000/npm_build/example.html"
|
||||
python serve.py
|
||||
|
||||
test-continuous:
|
||||
echo "Assuming npm install has been run by user"
|
||||
echo "Assuming npm ci has been run by user"
|
||||
echo "Also assuming make debug or release has also been run by a user (if needed)"
|
||||
npx karma start ./karma.conf.js --no-single-run --watch-poll
|
||||
|
||||
@ -107,7 +113,7 @@ perf:
|
||||
npx karma start ./karma.bench.conf.js --single-run
|
||||
|
||||
node-example:
|
||||
node ./canvaskit/node.example.js --expose-wasm
|
||||
node ./npm_build/node.example.js --expose-wasm
|
||||
|
||||
docker-compile:
|
||||
mkdir -p ${SKIA_ROOT}/out/canvaskit_wasm_docker
|
||||
@ -117,5 +123,5 @@ docker-compile:
|
||||
/SRC/infra/canvaskit/build_canvaskit.sh
|
||||
|
||||
typecheck:
|
||||
echo "Make sure you've run cd canvaskit && npm ci recently"
|
||||
cd canvaskit && npm run dtslint
|
||||
echo "Make sure you've run cd npm_build && npm ci recently"
|
||||
cd npm_build && npm run dtslint
|
||||
|
@ -26,8 +26,8 @@ make local-example
|
||||
```
|
||||
|
||||
This will print a local endpoint for viewing the example. You can experiment
|
||||
with the CanvasKit API by modifying `./canvaskit/example.html` and refreshing
|
||||
the page. For some more experimental APIs, there's also `./canvaskit/extra.html`.
|
||||
with the CanvasKit API by modifying `./npm_build/example.html` and refreshing
|
||||
the page. For some more experimental APIs, there's also `./npm_build/extra.html`.
|
||||
|
||||
For other available build targets, see `Makefile` and `compile.sh`.
|
||||
For example, building a stripped-down version of CanvasKit with no text support or
|
||||
|
@ -1677,6 +1677,8 @@ EMSCRIPTEN_BINDINGS(Skia) {
|
||||
.field("columns", &RuntimeEffectUniform::columns)
|
||||
.field("rows", &RuntimeEffectUniform::rows)
|
||||
.field("slot", &RuntimeEffectUniform::slot);
|
||||
|
||||
constant("rt_effect", true);
|
||||
#endif
|
||||
|
||||
class_<SkSurface>("Surface")
|
||||
|
@ -10,18 +10,18 @@ module.exports = function(config) {
|
||||
|
||||
// list of files / patterns to load in the browser
|
||||
files: [
|
||||
{ pattern: 'canvaskit/bin/canvaskit.wasm', included:false, served:true},
|
||||
{ pattern: 'npm_build/bin/canvaskit.wasm', included:false, served:true},
|
||||
{ pattern: 'perf/assets/*', included:false, served:true},
|
||||
'perf/perfReporter.js',
|
||||
'canvaskit/bin/canvaskit.js',
|
||||
'npm_build/bin/canvaskit.js',
|
||||
'tests/canvaskitinit.js',
|
||||
'tests/util.js',
|
||||
'perf/*.bench.js'
|
||||
],
|
||||
|
||||
proxies: {
|
||||
'/canvaskit/': '/base/canvaskit/bin/',
|
||||
'/assets/': '/base/perf/assets/'
|
||||
'/assets/': '/base/perf/assets/',
|
||||
'/npm_build/': '/base/npm_build/bin/',
|
||||
},
|
||||
|
||||
// test results reporter to use
|
||||
|
@ -10,10 +10,10 @@ module.exports = function(config) {
|
||||
|
||||
// list of files / patterns to load in the browser
|
||||
files: [
|
||||
{ pattern: 'canvaskit/bin/canvaskit.wasm', included:false, served:true},
|
||||
{ pattern: 'npm_build/bin/canvaskit.wasm', included:false, served:true},
|
||||
{ pattern: 'tests/assets/*', included:false, served:true},
|
||||
'tests/testReporter.js',
|
||||
'canvaskit/bin/canvaskit.js',
|
||||
'npm_build/bin/canvaskit.js',
|
||||
'tests/canvaskitinit.js',
|
||||
'tests/util.js',
|
||||
'tests/*.spec.js'
|
||||
@ -21,7 +21,7 @@ module.exports = function(config) {
|
||||
|
||||
proxies: {
|
||||
'/assets/': '/base/tests/assets/',
|
||||
'/canvaskit/': '/base/canvaskit/bin/',
|
||||
'/npm_build/': '/base/npm_build/bin/',
|
||||
},
|
||||
|
||||
// test results reporter to use
|
||||
|
@ -1006,7 +1006,8 @@
|
||||
paint.delete();
|
||||
|
||||
// Make it repeat a bunch with a shader
|
||||
const pattern = img.makeShader(CanvasKit.TileMode.Repeat, CanvasKit.TileMode.Mirror);
|
||||
const pattern = img.makeShaderCubic(CanvasKit.TileMode.Repeat, CanvasKit.TileMode.Mirror,
|
||||
1/3, 1/3);
|
||||
const patternPaint = new CanvasKit.Paint();
|
||||
patternPaint.setShader(pattern);
|
||||
|
@ -8,6 +8,10 @@
|
||||
canvas {
|
||||
border: 1px dashed #AAA;
|
||||
}
|
||||
#sk_legos,#sk_drinks,#sk_party,#sk_onboarding, #sk_animated_gif {
|
||||
width: 300px;
|
||||
height: 300px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@ -315,13 +319,17 @@
|
||||
}
|
||||
const quadrantSize = 150;
|
||||
|
||||
const dogShader = dogImg.makeShader(CanvasKit.TileMode.Clamp, CanvasKit.TileMode.Clamp,
|
||||
CanvasKit.Matrix.scaled(quadrantSize/dogImg.width(),
|
||||
quadrantSize/dogImg.height()));
|
||||
const mandrillShader = mandrillImg.makeShader(CanvasKit.TileMode.Clamp, CanvasKit.TileMode.Clamp,
|
||||
CanvasKit.Matrix.scaled(
|
||||
quadrantSize/mandrillImg.width(),
|
||||
quadrantSize/mandrillImg.height()));
|
||||
const dogShader = dogImg.makeShaderCubic(
|
||||
CanvasKit.TileMode.Clamp, CanvasKit.TileMode.Clamp,
|
||||
1/3, 1/3,
|
||||
CanvasKit.Matrix.scaled(quadrantSize/dogImg.width(),
|
||||
quadrantSize/dogImg.height()));
|
||||
const mandrillShader = mandrillImg.makeShaderCubic(
|
||||
CanvasKit.TileMode.Clamp, CanvasKit.TileMode.Clamp,
|
||||
1/3, 1/3,
|
||||
CanvasKit.Matrix.scaled(
|
||||
quadrantSize/mandrillImg.width(),
|
||||
quadrantSize/mandrillImg.height()));
|
||||
|
||||
const surface = CanvasKit.MakeCanvasSurface('rtshader2');
|
||||
if (!surface) {
|
||||
@ -493,10 +501,10 @@
|
||||
const textFont = new CanvasKit.Font(roboto, 30);
|
||||
|
||||
const imgscale = CanvasKit.Matrix.scaled(2, 2);
|
||||
const textureShader = CanvasKit.MakeImageFromEncoded(textureImgData).makeShader(
|
||||
CanvasKit.TileMode.Clamp, CanvasKit.TileMode.Clamp, imgscale);
|
||||
const normalShader = CanvasKit.MakeImageFromEncoded(normalImgData).makeShader(
|
||||
CanvasKit.TileMode.Clamp, CanvasKit.TileMode.Clamp, imgscale);
|
||||
const textureShader = CanvasKit.MakeImageFromEncoded(textureImgData).makeShaderCubic(
|
||||
CanvasKit.TileMode.Clamp, CanvasKit.TileMode.Clamp, 1/3, 1/3, imgscale);
|
||||
const normalShader = CanvasKit.MakeImageFromEncoded(normalImgData).makeShaderCubic(
|
||||
CanvasKit.TileMode.Clamp, CanvasKit.TileMode.Clamp, 1/3, 1/3, imgscale);
|
||||
const children = [textureShader, normalShader];
|
||||
|
||||
const prog = `
|
@ -485,7 +485,11 @@ export interface CanvasKit {
|
||||
*/
|
||||
readonly ShadowDirectionalLight: number;
|
||||
|
||||
readonly gpu: boolean; // if GPU code was compiled in
|
||||
readonly gpu?: boolean; // true if GPU code was compiled in
|
||||
readonly managed_skottie?: boolean; // true if advanced (managed) Skottie code was compiled in
|
||||
readonly particles?: boolean; // true if Particles code was compiled in
|
||||
readonly rt_effect?: boolean; // true if RuntimeEffect was compiled in
|
||||
readonly skottie?: boolean; // true if base Skottie code was compiled in
|
||||
|
||||
// Paragraph Enums
|
||||
readonly Affinity: AffinityEnumValues;
|
@ -6,7 +6,7 @@ let CanvasKit = null;
|
||||
const LoadCanvasKit = new Promise((resolve, reject) => {
|
||||
console.log('canvaskit loading', new Date());
|
||||
CanvasKitInit({
|
||||
locateFile: (file) => '/canvaskit/'+file,
|
||||
locateFile: (file) => '/npm_build/'+file,
|
||||
}).then((loaded) => {
|
||||
console.log('canvaskit loaded', new Date());
|
||||
CanvasKit = loaded;
|
||||
|
Loading…
Reference in New Issue
Block a user