Jump to page: 1 2
Thread overview
(Skia) Submit project to bindbc?
Jun 02
evilrat
Jun 03
pilger
Jun 03
pilger
Jun 03
evilrat
Jun 03
pilger
Jun 03
russhy
Jun 03
evilrat
Jun 04
evilrat
June 02

Skia is 2D graphics library used by Google Chrome and Firefox, it is used by Android and Flutter. It provides canvas API to draw graphics and fonts and licensed under permissive license (BSD).

I've made bindbc-skia bindings and would like to transfer it to BindBC team.
Whom I need to write to have it added as part of official BindBC packages?

It (C API) seems stable enough, unfortunately I'm not willing to maintain it for a long time and I may be unavailable for quite some time from time to time. However I think it will be useful to someone.

Source
https://github.com/Superbelko/bindbc-skia

June 02

On Wednesday, 2 June 2021 at 17:48:09 UTC, evilrat wrote:

>

I've made bindbc-skia bindings and would like to transfer it to BindBC team.
Whom I need to write to have it added as part of official BindBC packages?

It (C API) seems stable enough, unfortunately I'm not willing to maintain it for a long time and I may be unavailable for quite some time from time to time. However I think it will be useful to someone.

Source
https://github.com/Superbelko/bindbc-skia

There is no bindbc team. Just me. I'm not particularly eager to take on new packages, as I barely have time to maintain what's already there. But skia is worth having, IMO, so in this case I'll accept. I'll email you about it shortly.

June 03

On Wednesday, 2 June 2021 at 17:48:09 UTC, evilrat wrote:

>

Skia is 2D graphics library used by Google Chrome and Firefox, it is used by Android and Flutter. It provides canvas API to draw graphics and fonts and licensed under permissive license (BSD).

I've made bindbc-skia bindings and would like to transfer it to BindBC team.
Whom I need to write to have it added as part of official BindBC packages?

It (C API) seems stable enough, unfortunately I'm not willing to maintain it for a long time and I may be unavailable for quite some time from time to time. However I think it will be useful to someone.

Source
https://github.com/Superbelko/bindbc-skia

The C API is still marked experimental though. It definitely works; I ran dpp over it a month ago and compiled a simple demo.

The biggest problem for me is that the C API is missing things like text for instance. I really can't live without that.

The Skia codebase is pretty clean though, and dpp seems to be able to transpile most of the C++ headers I have tried (although the resulting D code is invalid here and there.) So it might be a nice project to try C++ interop on.

June 03

On Thursday, 3 June 2021 at 07:27:13 UTC, Sebastiaan Koppe wrote:

>

I ran dpp over it a month ago and compiled a simple demo.

i tried to compile skia on windows about a month ago. not a very enjoyable experience. the non standard build system/ tool chain is painful to set up. documentation for it is all over the place. i gave up frustrated when i couldn't resolve compilation errors. it feels like the windows platform isn't very well supported- to speak diplomatically.

June 03

On Thursday, 3 June 2021 at 07:27:13 UTC, Sebastiaan Koppe wrote:

>

I ran dpp over it a month ago and compiled a simple demo.

i tried to compile skia on windows about a month ago. not a very enjoyable experience. the non standard build system/ tool chain is painful to set up. documentation for it is all over the place. i gave up frustrated when i couldn't resolve compilation errors. it feels like the windows platform isn't very well supported- to speak diplomatically.

June 03

On Thursday, 3 June 2021 at 08:39:07 UTC, pilger wrote:

>

On Thursday, 3 June 2021 at 07:27:13 UTC, Sebastiaan Koppe wrote:

>

I ran dpp over it a month ago and compiled a simple demo.

i tried to compile skia on windows about a month ago. not a very enjoyable experience. the non standard build system/ tool chain is painful to set up. documentation for it is all over the place. i gave up frustrated when i couldn't resolve compilation errors. it feels like the windows platform isn't very well supported- to speak diplomatically.

I don't have windows, but did you set is_official_build=true, if that is set to false (the default) it apparently builds all third party libraries from scratch.

June 03

On Thursday, 3 June 2021 at 08:39:07 UTC, pilger wrote:

>

On Thursday, 3 June 2021 at 07:27:13 UTC, Sebastiaan Koppe wrote:

>

I ran dpp over it a month ago and compiled a simple demo.

i tried to compile skia on windows about a month ago. not a very enjoyable experience. the non standard build system/ tool chain is painful to set up. documentation for it is all over the place. i gave up frustrated when i couldn't resolve compilation errors. it feels like the windows platform isn't very well supported- to speak diplomatically.

The build process requires python 2(python 3 works too), git, ninja, and Visual Studio/Clang compiler.

it is then as simple as

  1. clone depot_tools and skia
  2. run their sync utility (python script)
  3. run their gn tool(step 1) to generate ninja build files
  4. build with ninja

Step 3 is most error-prone as there is literally zero documentation on what it does and how to decide what to choose.

Here is my cmd for build for steps 3 and 4


bin/gn gen out/Shared --args='is_official_build=true is_component_build=true skia_enable_tools=false skia_use_icu=false skia_use_sfntly=false skia_use_piex=true skia_use_dng_sdk=false skia_use_system_expat=false skia_use_system_libjpeg_turbo=false skia_use_system_libpng=false skia_use_system_libwebp=false skia_use_system_zlib=false'

ninja -C out/Shared

found and tweaked from
https://stackoverflow.com/questions/50228652/how-to-compile-skia-on-windows

and specifically (turn off dng_sdk)
https://github.com/mono/SkiaSharp/blob/605946352e543ee39345bb4969db28ddf2ae4977/cake/BuildExternals.cake#L95-L101

The build process took just about one minute. No idea how feature complete this configuration, but it seems everything works for my needs.

June 03

On Thursday, 3 June 2021 at 07:27:13 UTC, Sebastiaan Koppe wrote:

>

The C API is still marked experimental though. It definitely works; I ran dpp over it a month ago and compiled a simple demo.

The biggest problem for me is that the C API is missing things like text for instance. I really can't live without that.

Yup, that sucks. But since C API looks like just a thin wrapper I think text could be added on top of it using C++ function loading.

>

The Skia codebase is pretty clean though, and dpp seems to be able to transpile most of the C++ headers I have tried (although the resulting D code is invalid here and there.) So it might be a nice project to try C++ interop on.

Or generate bindings using my tool O_-

Unfortunately it is still sucks because it uses STL, and there is tons of junk in it. Maybe if I could just strip produced garbage and take only what is used (atomics, unique_ptr, strings, etc..., but not all those extra functions) it will work.

June 03

On Thursday, 3 June 2021 at 11:35:32 UTC, evilrat wrote:

>

Unfortunately it is still sucks because it uses STL, and there is tons of junk in it. Maybe if I could just strip produced garbage and take only what is used (atomics, unique_ptr, strings, etc..., but not all those extra functions) it will work.

So maybe it is better to write an abstraction layer in C++ that can be used directly from D.

Other than that, Skia is a good test case for D's C++ support.

June 03

On Thursday, 3 June 2021 at 11:04:10 UTC, evilrat wrote:

>

https://stackoverflow.com/questions/50228652/how-to-compile-skia-on-windows

iirc this describes the roadblock i hit. i even tried a similar solution/ workaround first but it lead me nowhere, too. thanx for the detailed instructions. i'm going to try this again.

« First   ‹ Prev
1 2