Commit Graph

6 Commits

Author SHA1 Message Date
Kevin Lubick
54c1b3dd43 [canvaskit] Remove Sk from nearly all function/type names.
This is a massive breaking change for all existing users of CanvasKit.

It will be (one of the only) changes in 0.19.0 to make the transition
easier.

Suggested reviewing order:
 - index.d.ts (to see type changes). Notice SkPicture still has Sk
   prefix, but no other types do (this felt "right" since Sk is
   part of the name of the type, but I can be swayed on this).
 - canvaskit-wasm-tests.ts
 - tests/*.spec.js
 - interface.js and helper.js
 - html examples
 - markdown files

Change-Id: I3b3d3815df2078f986893df3c70101d6248c117d
Docs-Preview: https://skia.org/?cl=322617
Bug: skia:10717
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322617
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2020-10-07 21:01:32 +00:00
Kevin Lubick
c21dc07a78 [canvaskit] Add demo on how to decode images in web worker
Change-Id: I3c9107799c5df2c39a8ea8ddf106978786de79f7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317389
Reviewed-by: Yegor Jbanov <yjbanov@google.com>
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2020-09-17 20:15:05 +00:00
Elliot Evans
1a4107a32a Add path rendering performance demo to demos.skia.org
In this demo the user may choose between one of three path rendering methods
    1. SVG
    2. Canvas2D Path2D API
    3. CanvasKit

SVGs is animated using css transforms on the main thread, while Canvas2D and CanvasKit are animated
in a worker using OffscreenCanvas.

While the user views the result of the rendering, the demo collects framerate data and displays it
so the user may compare the performance of the three methods.

Change-Id: I8cd6e079bab8815614e09a276cfe78bee9557fda
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309327
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-08-11 19:57:08 +00:00
Elliot Evans
683bbe01ff Modify CanvasKit to work in a Web Worker and add a demo of it in action.
In this CL:
- Modify modules/canvaskit/gpu.js to support the use of OffscreenCanvas.
- Add a CanvasKit demos.skia.org demo for CanvasKit in a Web Worker.

Change-Id: I8c26bd94f2aa5b3c09cf149b056b910b0e4cd602
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/304320
Reviewed-by: Elliot Evans <elliotevans@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Commit-Queue: Elliot Evans <elliotevans@google.com>
2020-07-21 22:21:06 +00:00
Kevin Lubick
d12c124d87 [demos] Move to subdir
This was supposed to go in the previous CL, but patchsets are hard.

Change-Id: I9c479e547bc3f206bb2225ca54b25c52b9483960
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298407
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-06-23 17:29:37 +00:00
Kevin Lubick
2639a144ff [demos] Add directory from which to serve demos.skia.org
To run the demos locally, cd in to the directory and run
  make local

Then navigate to, for example, http://localhost:8123/demos/hello_world/

Change-Id: I5954989053d4602cd558c646e19106998dc00604
Bug: skia:10170
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298397
Reviewed-by: Weston Tracey <westont@google.com>
2020-06-23 17:24:59 +00:00