Live data from Hacker News

Skia: an open source 2D graphics library

skia.org

41–50 of 119 posts

Re: Skia: an open source 2D graphics library

#42
Aseprite switched to Skia a year or so ago (https://github.com/aseprite/aseprite).

Regret it. Google doesn't care to maintain CMake support for it, so there goes pulling it in via source and building as a library dependency. https://github.com/aseprite/aseprite/issues/1598#issuecommen...

You may ask, "why don't you just write your own CMake module like everyone else?" I've tried. I think the build system changed a bit since, but back when I last tried, it required grabbing depot tools, checking out a source tree and a ton of other dependencies.

I am the original person that got Aseprite building on FreeBSD - but now I can't build it on any platform at all. Skia has too many points of failure in the build process. (Here's another issue where I spend hours trying to figure out what's going on https://github.com/aseprite/aseprite/issues/1081)

Every other graphics library (SDL2, Allegro, SFML) can work with CMake.

Another pain point: Skia isn't on any package managers to my knowledge. Here's the debian RFP https://bugs.debian.org/818180.

Re: Skia: an open source 2D graphics library

#43

For anyone thinking of skipping looking at this one. I was not interested either until I read this part: > It serves as the graphics engine for Google Chrome and Chrome OS, Android, Mozilla Firefox and Firefox OS, and many other products.

Similar situation to the freetype/harfbuzz all-but-Microsoft/Apple (open source) monoculture.

I'm interested to understand more about how some categories of software libraries don't foster multiple strong open source alternatives, while others do.

Re: Skia: an open source 2D graphics library

#44
post #31
post #7

Earlier quoted context omitted.

Skia is probably the most popular 2D graphics library at the moment. I don't really know why this got on HN now. It's already extremely popular. I use it in a little WIP game engine. It's very pleasant, excellent little library. There's an online jsfiddle-esque demo here https://fiddle.skia.org/ if you want to try it out.

The funny thing is that Skia is a startup in NC that was acquired more than a decade ago and turned into one of the smallest and most elusive Google engineering offices, basically just to keep Mike Reed (TrueType and TrueType GX) and his people.

The original “Skia” was the development name for QuickDraw GX[1]. (I don’t know why the Wikipedia page doesn’t say that any more.) Cary Clark, who now works at said “elusive Google engineering office”, was the mastermind behind that Skia. TrueType was a sibling project; we (QuickDraw GX team) collaborated closely with them.

Mike’s AlphaMask (sold to OpenWave) didn’t share code with the original Skia but was kind of a Skia 2, with more flexible and clearer architecture than the original. This Skia—which, again, doesn’t share code with either of its predecessors—is a kind of version 3, with a tribute name back to that original Skia.

[1]: https://en.wikipedia.org/wiki/QuickDraw_GX

Re: Skia: an open source 2D graphics library

#45
post #40

Earlier quoted context omitted.

Skia is also used by Firefox on some platforms (I think Linux/X11 and Android?) as its graphics backend.

But not with Webrender that's coming in Firefox 59 I suppose?

WebRender is not even enabled by default in Nightly yet. It’ll still be a while before it’s ready for production—definitely not Firefox 59. I don’t know of any schedule, but I haven’t been following it much either.

But yes, the Quantum Render project is all about making WebRender Firefox’s primary graphics backend.

Re: Skia: an open source 2D graphics library

#46
post #38

Earlier quoted context omitted.

If I understod correctly (which isn’t certain) Skia is also the rendering backend for chromium. Chromium is used as the rendering bits for electron. Electron is how you make these apps on “web engines”. So all those editors based on web engines likely render through Skia...

I believe Skia was originally used in Android as well.

You believe correctly.

Re: Skia: an open source 2D graphics library

#47
post #40

Earlier quoted context omitted.

But not with Webrender that's coming in Firefox 59 I suppose?

WebRender is not even enabled by default in Nightly yet. It’ll still be a while before it’s ready for production—definitely not Firefox 59. I don’t know of any schedule, but I haven’t been following it much either. But yes, the Quantum Render project is all about making WebRender Firefox’s primary graphics backend.

Somehow I remember it was supposed to be Firefox 59, not sure where I saw it now. Of course it can slip if it's not ready.

Re: Skia: an open source 2D graphics library

#48
post #42

Aseprite switched to Skia a year or so ago ( https://github.com/aseprite/aseprite ). Regret it. Google doesn't care to maintain CMake support for it, so there goes pulling it in via source and building as a library dependency. https://github.com/aseprite/aseprite/issues/1598#issuecommen... You may ask, "why don't you just write your own CMake module like everyone else?" I've tried. I think the build system changed a…

Out of curiosity, aside from the obvious disadvantages you mentioned, what advantages does it bring to the table? Long-time casual user of Aseprite. To be honest, I never knew it was open source until just now, I actually own a couple copies.

Re: Skia: an open source 2D graphics library

#49
post #39

Ugh... This build system is _horrible_. bash-dependent meta-builder for ninja-build working in git checkouts. Are both actual releases and traditional build systems that out of fashion?

You guys are killing me. After downloading twenty-some git repos(?) as dependencies (most of which my system already has), this (I’ll try to quit complaining about this better mousetrap now):

kamloops$ gn Traceback (most recent call last): File "/home/bch/work/skia/src/vendor/depot_tools/gn.py", line 38, in sys.exit(main(sys.argv)) File "/home/bch/work/skia/src/vendor/depot_tools/gn.py", line 22, in main bin_path = gclient_utils.GetBuildtoolsPlatformBinaryPath() File "/home/bch/work/skia/src/vendor/depot_tools/gclient_utils.py", line 749, in GetBuildtoolsPlatformBinaryPath raise Error('Unknown platform: ' + sys.platform) gclient_utils.Error: Unknown platform: netbsd8

Re: Skia: an open source 2D graphics library

#50
post #48
post #42

Aseprite switched to Skia a year or so ago ( https://github.com/aseprite/aseprite ). Regret it. Google doesn't care to maintain CMake support for it, so there goes pulling it in via source and building as a library dependency. https://github.com/aseprite/aseprite/issues/1598#issuecommen... You may ask, "why don't you just write your own CMake module like everyone else?" I've tried. I think the build system changed a…

Out of curiosity, aside from the obvious disadvantages you mentioned, what advantages does it bring to the table? Long-time casual user of Aseprite. To be honest, I never knew it was open source until just now, I actually own a couple copies.

Allegro, SDL2, SFML, et al. do more things (audio, joystick support, keyboard/mouse events) across platforms. Skia does one thing really well, 2D graphics.

There is a ticket open for building an abstraction layer @ https://github.com/aseprite/aseprite/issues/139

In terms of Aseprite:

> > But what made it the choice over Allegro 5, SFML, and SDL2?

> through all these years I reached to the conclusion that you need full control of mouse and keyboard messages (and all window messages in particular, e.g. to give proper support to pen/stylus). [1]

[1] https://github.com/aseprite/aseprite/issues/139#issuecomment...

Post reply on HN