Skip to content
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

Awesome work! #1

Open
reed-at-google opened this issue May 22, 2018 · 4 comments
Open

Awesome work! #1

reed-at-google opened this issue May 22, 2018 · 4 comments

Comments

@reed-at-google
Copy link

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
reed@google.com

@Zubnix
Copy link
Owner

Zubnix commented May 22, 2018

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?

@reed-at-google
Copy link
Author

reed-at-google commented May 22, 2018 via email

@Zubnix
Copy link
Owner

Zubnix commented May 22, 2018

Hi reed,

I did not try the GL backend, although I would really like to plug skia into webgl.

Ideally 🦄 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 😉

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 ❓ 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. 👍

@Zubnix
Copy link
Owner

Zubnix commented Jun 4, 2018

Relevant discussion: https://bugs.chromium.org/p/skia/issues/detail?id=8041

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants