DjDeveloperr / skia_canvas

Fast HTML Canvas API implementation for Deno using Google Skia
https://deno.land/x/skia_canvas
Apache License 2.0
124 stars 7 forks source link

Async Encoding #28

Open DjDeveloperr opened 1 year ago

DjDeveloperr commented 1 year ago

Just need to offload encoding to a separate thread and call with non blocking: true. It'll be useful for applications which handle concurrent requests and render images for them.

Also see: #27

lino-levan commented 1 year ago

Implementation-wise, this should be done with web workers right?

If so, we should probably mention that this breaks compatibility with deno compile

DjDeveloperr commented 1 year ago

Nope, workers aren't needed. We just need to add another FFI symbol definition that refers to same encoding symbol but with nonblocking: true.