[pathkit][canvaskit] roll versions

This removes the buggy .then() constructor, primarily.

Docs-Preview: https://skia.org/?cl=195126
Bug: skia:
Change-Id: Ie20512267ce3f822eb0d68e71fc07f3d3245c1e9
Reviewed-on: https://skia-review.googlesource.com/c/195126
Auto-Submit: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
This commit is contained in:
Kevin Lubick 2019-02-25 16:04:02 -05:00 committed by Skia Commit-Bot
parent 0b2c05470b
commit 2722083cbe
8 changed files with 18 additions and 11 deletions

View File

@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [0.4.0] - 2019-02-25
### Added
- `SkPath.addRoundRect`, `SkPath.reset`, `SkPath.rewind` exposed.
- `SkCanvas.drawArc`, `SkCanvas.drawLine`, `SkCanvas.drawOval`, `SkCanvas.drawRoundRect` exposed.
@ -24,6 +27,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Removed
- `SkPaint.setTextSize()`, `SkPaint.getTextSize()`, `SkPaint.setTypeface()`
which should be replaced by using `SkFont`.
- Deprecated `CanvasKitInit().then()` interface (see 0.3.1 notes)
### Fixed

View File

@ -1,6 +1,6 @@
{
"name": "canvaskit-wasm",
"version": "0.3.1",
"version": "0.4.0",
"description": "A WASM version of Skia's Canvas API",
"main": "bin/canvaskit.js",
"homepage": "https://github.com/google/skia/tree/master/experimental/canvaskit",

View File

@ -3,7 +3,6 @@
// and why the below fixes it.
Module['ready'] = function() {
return new Promise(function (resolve, reject) {
delete Module['then'];
Module['onAbort'] = reject;
if (runtimeInitialized) {
resolve(Module);
@ -14,5 +13,4 @@ Module['ready'] = function() {
}
});
}
// TODO(kjlubick): Shut .then() entirely off in 0.4.0 by uncommenting below.
// delete Module['then'];
delete Module['then'];

View File

@ -6,9 +6,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [0.6.0] 2019-02-25
### Fixed
- Potential bug in `ready()` if already loaded.
### Removed
- Deprecated `PathKitInit.then()` see 0.5.1 notes.
## [0.5.1] 2019-01-04
### Changed

View File

@ -1,6 +1,6 @@
{
"name": "pathkit-asmjs",
"version": "0.5.1",
"version": "0.6.0",
"description": "A asm.js version of Skia's PathOps toolkit",
"main": "bin/pathkit.js",
"homepage": "https://github.com/google/skia/tree/master/modules/pathkit",

View File

@ -1,6 +1,6 @@
{
"name": "pathkit-wasm",
"version": "0.5.1",
"version": "0.6.0",
"description": "A WASM version of Skia's PathOps toolkit",
"main": "bin/pathkit.js",
"homepage": "https://github.com/google/skia/tree/master/modules/pathkit",

View File

@ -3,7 +3,6 @@
// and why the below fixes it.
Module['ready'] = function() {
return new Promise(function (resolve, reject) {
delete Module['then'];
Module['onAbort'] = reject;
if (runtimeInitialized) {
resolve(Module);
@ -14,5 +13,4 @@ Module['ready'] = function() {
}
});
}
// TODO(kjlubick): Shut .then() entirely off in 0.6.0 by uncommenting below.
// delete Module['then'];
delete Module['then'];

View File

@ -96,7 +96,7 @@ Samples
var locate_file = '';
if (window.WebAssembly && typeof window.WebAssembly.compile === 'function') {
console.log('WebAssembly is supported!');
locate_file = 'https://unpkg.com/canvaskit-wasm@0.3.0/bin/';
locate_file = 'https://unpkg.com/canvaskit-wasm@0.3.1/bin/';
} else {
console.log('WebAssembly is not supported (yet) on this browser.');
document.getElementById('demo').innerHTML = "<div>WASM not supported by your browser. Try a recent version of Chrome, Firefox, Edge, or Safari.</div>";
@ -112,7 +112,7 @@ Samples
var fullBounds = {fLeft: 0, fTop: 0, fRight: 500, fBottom: 500};
CanvasKitInit({
locateFile: (file) => locate_file + file,
}).then((CK) => {
}).ready().then((CK) => {
CanvasKit = CK;
DrawingExample(CanvasKit);
InkExample(CanvasKit);