[CanvasKit] Implement some basic Canvas/Surface things.
drawText is having issues in a release build. Skottie sometimes
asserts in debug mode. This possibly has something to do with
memory alignment - like https://skia-review.googlesource.com/c/skia/+/155980
helped fix.
Patchset 9 shows off integrating Skia drawing to
an HTML canvas using Ganesh.
To see it locally, set up https://kripken.github.io/emscripten-site/docs/getting_started/downloads.html
and then set $EMSDK to be that directory. Then run
make clean
make local-example
and navigate to http://localhost:8000/skia-wasm/example.html
Patchset 20 shows off Skottie animating directly to a Canvas.
Docs-Preview: https://skia.org/?cl=153882
Bug: skia:
Change-Id: I2ad2f4ffac00925ee901982ccbaeb7aa63b1ea23
Reviewed-on: https://skia-review.googlesource.com/153882
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
diff --git a/modules/pathkit/compile.sh b/modules/pathkit/compile.sh
index 25bc3d5..ea6f146 100755
--- a/modules/pathkit/compile.sh
+++ b/modules/pathkit/compile.sh
@@ -89,13 +89,13 @@
-DWEB_ASSEMBLY=1 \
-fno-rtti -fno-exceptions -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0 \
$WASM_CONF \
--s MODULARIZE=1 \
--s EXPORT_NAME="PathKitInit" \
--s NO_EXIT_RUNTIME=1 \
--s ERROR_ON_UNDEFINED_SYMBOLS=1 \
--s ERROR_ON_MISSING_LIBRARIES=1 \
--s NO_FILESYSTEM=1 \
-s BINARYEN_IGNORE_IMPLICIT_TRAPS=1 \
+-s ERROR_ON_MISSING_LIBRARIES=1 \
+-s ERROR_ON_UNDEFINED_SYMBOLS=1 \
+-s EXPORT_NAME="PathKitInit" \
+-s MODULARIZE=1 \
+-s NO_EXIT_RUNTIME=1 \
+-s NO_FILESYSTEM=1 \
-s STRICT=1 \
$OUTPUT \
$BASE_DIR/pathkit_wasm_bindings.cpp \
diff --git a/modules/pathkit/npm-asmjs/example.html b/modules/pathkit/npm-asmjs/example.html
index f51c628..c50c453 100644
--- a/modules/pathkit/npm-asmjs/example.html
+++ b/modules/pathkit/npm-asmjs/example.html
@@ -1,5 +1,5 @@
<!DOCTYPE html>
-<title>PathKit (Skia + asm.js)</title>
+<title>PathKit (Skia's Geometry + asm.js)</title>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
diff --git a/modules/pathkit/npm-wasm/example.html b/modules/pathkit/npm-wasm/example.html
index 09af83b..488f6ec 100644
--- a/modules/pathkit/npm-wasm/example.html
+++ b/modules/pathkit/npm-wasm/example.html
@@ -1,5 +1,5 @@
<!DOCTYPE html>
-<title>PathKit (Skia + WASM)</title>
+<title>PathKit (Skia's Geometry + WASM)</title>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
diff --git a/modules/pathkit/pathkit_wasm_bindings.cpp b/modules/pathkit/pathkit_wasm_bindings.cpp
index 38af2c6..d69e6dd 100644
--- a/modules/pathkit/pathkit_wasm_bindings.cpp
+++ b/modules/pathkit/pathkit_wasm_bindings.cpp
@@ -5,19 +5,19 @@
* found in the LICENSE file.
*/
+#include "SkCubicMap.h"
#include "SkDashPathEffect.h"
#include "SkFloatBits.h"
#include "SkFloatingPoint.h"
#include "SkMatrix.h"
#include "SkPaint.h"
+#include "SkPaintDefaults.h"
#include "SkParsePath.h"
-#include "SkStrokeRec.h"
#include "SkPath.h"
#include "SkPathOps.h"
-#include "SkCubicMap.h"
#include "SkRect.h"
-#include "SkPaintDefaults.h"
#include "SkString.h"
+#include "SkStrokeRec.h"
#include "SkTrimPathEffect.h"
#include <emscripten/emscripten.h>