Hacker News new | ask | show | jobs
by tapirl 852 days ago
So will they maintain a stable C API to skia?

It is long-time known pain point that the skia official doesn't provide a usable C API.

3 comments

Why would they? The API they (WebKit) are providing is the Canvas API, the fact that they're using Skia behind the scenes is an implementation detail... I don't see why they would go through the trouble of maintaining a stable C API for internal use in a C++ project?
Maybe so they could use newer versions of skia
This assumes that maintaining a stable C interface to Skia, and then writing the WebKit rendering code against that C interface, is easier than maintaining WebKit rendering code which calls Skia's C++ interface directly. I'm not convinced that that's the case.

At the very least, the stable interface should probably be C++, mapping between C and C++ is often non-trivial...

I think only Microsoft maintains a stable C API for their SkiaSharp. Skia only cares about google projects. I don't even know why they bother to opensource it.
Open source doesn't mean there are any obligations. It's surprising how we don't see more of this. I imagine Google wouldn't even bother with making the source available if there was an obligation attached.
One way to keep a stable API is to pin the version used...

And let's be honest, the external API doesn't change awfully fast anyway. A totally dead project would fall behind, but even a tiny amount of work would be able to keep up.