-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QUESTION abou SKIA + NODE + NAPI #1652
Comments
I don't have an exact answer, but that's one possibility I've been wondering about too. Ideas on my radar:
(I'm not letting myself start on this stuff until I finish a libuv PR I've been working on for a year. I of course won't block anyone who wants to try these things, and I'll help where I can!) |
i do not have the time and the skill for a project full start. But i would love to be part of it. I m more on the side of compatibility and feasibility rather than performances |
If/when I start work on it, I'll keep you posted! |
FWIW, we tried using CavnasKit, and it was maybe 70-80% there until we realized the WASM code leaked memory like crazy and then the .js portion is missing all kinds of text alignment stubs. So, beyond pure WASM perf diffs, there is a possible problem of having to re-create instances of canvas to get around leaky memory issue. @statm looked at this before |
Well or contribute and fix them. |
Are browsers even consistent with themselves across different hardware? I'd think not. I don't understand much of the Skia source, but it looks like it can use HarfBuzz to shape text, so we could get consistent shaping across all platforms with it. I also have played around with shaping/rendering in JS/WASM but we're pretty far from being able to do that I think. HarfBuzz's official WASM build is missing a lot of features that are needed for a high quality implementation, like vertical text features. I should be working on that soon for a related project though. |
Browsers are consistent between themselves, with exception of old bad supported intel gpu. But otherwise i would say yes. Is vertical text a native canvas api? i did not know. |
What create inconsistencies is also sometimes font subhinting/anti aliasing settings in the SO would influence text measurements api. But all |
Was canvaskit faster? |
I also tried canvaskit. The difference in performance on a PC cannot be discerned, as we have not rigorously benchmarked it. |
I started a new project using It's still in very early stage, and it will be my first priority side project in 2021. For now, I have a minimal benchmark suite and it seems faster than node-canvas, the benchmark could be found at: https://github.com/Brooooooklyn/skia-rs/blob/main/benchmark/bench.ts
And of course it will be easy to install, no prebuild or download phases needed. |
oh i ll play with it as a backend for fabricjs, does it support a bit of text yet? |
No I haven't start text working yet, I will add a checklist in |
Roadmap for |
I hope to get some time to familiarize with the codebase. |
@asturur |
Having problems building The roadmap shows that a lot is working! |
@chearon @zbjornson i wanted to start a question/conversation
https://github.com/google/skia/tree/master/modules/canvaskit
This thing here is an emscripten port of skia and works as a JS + WASM replacement of canvas ( also in node )
Could the C source code, before being emscripten converted, be easily converted in a NAPI module and be as much performant as possible? would be this a even more greater node-canvas library?
The text was updated successfully, but these errors were encountered: