skia-wasm-port
                                
                                
                                
                                    skia-wasm-port copied to clipboard
                            
                            
                            
                        Awesome work!
Very impressed. Would love to hear any problems or complaints you have with Skia; changes we could do to make this library easier to build and/or smaller/faster.
Mike Reed [email protected]
Thanks for the heads up!
As for suggestions: The first thing that comes to mind is I had to make some changes to the original skia build script to get some options disable/enabled that were automatically enable/disable on linux but were needed when compiling to wasm (llvm bitcode actually). I'll see if I can diff them (it's been a while since I worked on this port). Would you like me to put them here, or as a separate bug on the skia project site?
Hi Erik,
Maybe a separate bug, so we can easily track (several of) them.
Did you try to use the GL backend at all, or just the raster one? Any obviously hunks of code you wish you could have skipped (to reduce the binary size)? Do you think a deliberate C-api (maintained by us) would be better than just binding to the C++?
As you can tell, we're pretty interested in skia-on-webasm, and are impressed that you've already done it.
mike
On Tue, May 22, 2018 at 4:53 PM Erik De Rijcke [email protected] wrote:
Thanks for the heads up!
As for suggestions: The first thing that comes to mind is I had to make some changes to the original skia build script to get some options disable/enabled that were automatically enable/disable on linux but were needed when compiling to wasm. I'll see if I can diff them (it's been a while since I worked on this port). Would you like me to put them here, or as a separate bug on the skia project site?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Zubnix/skia-wasm-port/issues/1#issuecomment-391136981, or mute the thread https://github.com/notifications/unsubscribe-auth/AMa7ojEePSFsQVKi9WGcjAMKe0V4tWGmks5t1HrEgaJpZM4UJPjk .
Hi reed,
I did not try the GL backend, although I would really like to plug skia into webgl.
Ideally :unicorn: I'd like to have skia render in an offscreen webgl canvas in a webworker. But that's mostly because of my own personal agenda :wink:
I've created a quick gist of the changes I did to give you some idea: https://gist.github.com/Zubnix/8e63ee2e0f1ceffc9ad266596d5f5197
There are basically 2 changes.
- Enable the custom font manager when compiling for wasm. This one speaks for itself I think.
 - Disable the entire gpu support. If I remember correctly, this was done because skia seems to pull in a lot of external GL related libraries that are either not desired nor available when targeting the browser. As I was focussing on getting things to work first, I did not put any effort into getting things to work with WebGL. I assume some effort is required :question: to have skia build using only wasm (or rather emscripten) compatible egl+gles2 & friends.
 
A deliberate C-api would absolute make things much easier when creating bindings. :+1:
Relevant discussion: https://bugs.chromium.org/p/skia/issues/detail?id=8041