Commit Graph

14 Commits

Author SHA1 Message Date
Kevin Lubick
4f18a0c51e [canvaskit] Add job to compile GMTests js/wasm
Next step is to add the following task:
Test-Ubuntu18-EMCC-Golo-GPU-QuadroP400-wasm-Release-All-WasmGMTests_WebGL2

Bug: skia:10812
Change-Id: Ibe45b7205cebd30f0e7904ea6d93a01ea3df87fe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324617
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2020-10-09 20:41:43 +00:00
Kevin Lubick
9eaca48f46 [canvaskit] Update emsdk to 2.0.6
Of note, I had to explicitly export _malloc and _free, since
we use those directly in the binding layer.

Code size change:
 -20k on JS (-1k compressed)
 -21k on WASM (-15k compressed)

Bug: skia:10419, skia:10794
Change-Id: Id7670b6fcbf1524ad3155a863db51eb49aa24811
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323979
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-10-08 16:38:10 +00:00
Kevin Lubick
157577b866 [canvaskit,pathkit] Update to emsdk 2.0
There was a break that was solved by adding -lGL to our link
steps. I discovered a few extra flags to aid in debugging builds
and I've left those in (they aren't too noisy IMO).

This changes the base dockerfile to use the official emscripten one.

Code size delta for full build is +5 kb

For future reference, emsdk decides which "library JS" files to
pull in using a83ba99d60/tools/building.py (L1553)
Those JS files live in src (e.g. a83ba99d60/src/library_html5_webgl.js (L222))
and define functions that the C++ code can call.

I'd like to follow-up on what -lEGL is doing.

Also, since the new image no longer has depot_tools, we need
to make docker/skia-wasm-release/Dockerfile install it.

Change-Id: I5a38e61e5080e9c4cb1e0a7e031509bcb107ff86
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/311726
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2020-08-20 14:55:50 +00:00
Kevin Lubick
d1285b131b Upgrade CanvasKit emscripten to version 1.39.16.
Changes are largely mechanical.  Non-mechanical changes to support newer
versions of emscripten are enumerated below, in format ${EMSCRIPTEN_VERSION}:
${RELEVANT_CHANGE}.

- 1.39.9: TOTAL_MEMORY has been renamed INITIAL_MEMORY.
- 1.39.12: passing of linker flags to wasm-ld has changed in a way that requires
  supplying `--no-entry` to avoid error message "wasm-ld: error: entry symbol
  not defined (pass --no-entry to suppress): main".
- 1.39.16: The factory function created by using `MODULARIZE` build option now
  returns a Promise instead of the module instance.  As such, the ready.js
  workaround is removed.  Note this is a breaking API change for CanvasKit,
  which now uses just `then()` and not `ready().then()`.
- 1.38.33: `emsdk install` hasn't required the `-64bit` suffix on version names
  since `1.38.33`, so we remove them.  E.g. `emsdk install sdk-1.39.6-64bit`
  simply becomes `emsdk install sdk-1.39.16`.

cf. https://github.com/emscripten-core/emscripten/blob/master/ChangeLog.md

Bug: NONE
Change-Id: Iabec4bd5ad7db2e0715ad42c2e4cf7d67b192b4c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291182
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-05-21 14:18:48 +00:00
Kevin Lubick
f76da63fbd [canvaskit] Update build script to support latest Emscripten
Add workaround for https://github.com/emscripten-core/emscripten/issues/10072

Note to reviewer, please check out the steps I added
in canvaskit/README.md to document this process.

Bug: skia:9816
Change-Id: Idbe7ff08ac62f4f4d70e656384831b8d24c4a684
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266941
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-01-28 15:41:58 +00:00
Kevin Lubick
fa5a138170 [canvaskit] Update to build with emscripten 1.38.47
Bug: skia:9052
Change-Id: Ic1aec2c9b8ace556f5b77862582894f59fd26b64
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/247302
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-10-09 15:08:10 +00:00
Kevin Lubick
85de152dfa Move common canvas/pathkit dockerfiles to more intuitive location
Also rename emsdk-base -> emsdk-release so it is consistent with
the container name.

Bug: skia:
NOTRY: true
Change-Id: Idec19bdeb64a64120d0890b2987c2dce0a57535a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206909
Reviewed-by: Stephan Altmueller <stephana@google.com>
2019-04-09 23:14:13 +00:00
Kevin Lubick
d618027eaf [pathkit/canvaskit] Address race when uploading results
As long as I'm updating the image, update Chrome from 68 to 72

Bug: skia:8844
Change-Id: Ia62ffb062b2c137c89f6e4eb3be30c22ca375bae
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/200508
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
2019-03-12 21:45:04 +00:00
Kevin Lubick
3f67f411d8 [canvaskit] Move from experimental to modules
Bug: skia:
Change-Id: I2ffd54cf81c974f3a80103e1726a06067cc90d82
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/200044
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2019-03-11 21:09:52 +00:00
Kevin Lubick
1ba9c4df77 [canvaskit] JS API in place for shaped text
Depends on https://skia-review.googlesource.com/c/skia/+/186870

It's optional at build time, which is good given that
it adds about 2MB of uncompressed size (from 4.3 MB to 6.4 MB)

Bug: skia:
Change-Id: I5f54ad628b735c3bc880e917394fb27d16849ebe
Reviewed-on: https://skia-review.googlesource.com/c/187924
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-02-22 15:39:55 +00:00
Kevin Lubick
e70c6b13dd Update emsdk-release image
Bug: skia:
Change-Id: I780912e1c481765d2d17d2ce66a27470ee8b4912
Reviewed-on: https://skia-review.googlesource.com/c/168483
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2018-11-06 13:21:34 +00:00
Kevin Lubick
f2a146c6ad [canvaskit] Add perf jobs
Of note, the perf results reported are not directly
comparable CPU->GPU because the GPU ones are likely
emulated (no real gpu in the Docker container on an
GCE VM).

Bug: skia:
Change-Id: I52259085f4d9e22c45b67f3e8ce1211a5c6c6d3e
Reviewed-on: https://skia-review.googlesource.com/c/163126
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2018-10-17 19:41:16 +00:00
Kevin Lubick
3d99b1e347 Add Correctness tests for CanvasKit
Also make a CPU only and GPU only build (although
the latter still has a lot of CPU logic).

Bug: skia:
Change-Id: I857c2300021c2adb5344865c28e4ad3e8d332954
Reviewed-on: https://skia-review.googlesource.com/c/162022
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2018-10-16 14:32:28 +00:00
Kevin Lubick
8e9750d3c5 Add CanvasKit build
Building CanvasKit uses very similar logic to PathKit, so there
was a fair amount of copy/paste/customize.

Fixes the name of skia.js/wasm -> canvaskit.js/wasm and
adds a package.json to formally track versions.

Also move PathKit helper scripts to align better.

Docs-Preview: https://skia.org/?cl=160463
Bug: skia:
Change-Id: Ie75b30592dcc4d520dca41f6f5579006aaa8849b
Reviewed-on: https://skia-review.googlesource.com/c/160463
Reviewed-by: Eric Boren <borenet@google.com>
2018-10-09 13:56:56 +00:00