Vladimir Vukićević: Another graphics library, Skia, has recently appeared as part of the Google Chrome code drop. It’s unfortunate that Google felt they needed to develop their own alternative in a closed fashion instead of joining an existing open source project. The Cairo project, and through it the many open source projects that depend on it, could have benefitted from the work that was done on Skia behind closed doors. Even worse, unlike most of the rest of the Chrome code, Skia is licensed under the Apache Public License v2.0. This creates difficulties in being able to reuse the Skia code in most projects.
However, on a happy note, hopefully it will ignite a performance race between itself and Cairo. I also wonder if Cairo will ever pick up what Skia has in the way of effects and animation. Cairo does have filters, gradients. But not blurs and lighting effects.
The biggest obstacle to using Skia on its own, though, is that Skia is really only partially released. It’s a 403. Allegedly, some folks were able to nab the source during a brief window on March 4th of last year. And the source code in the Chrome tree is a snapshot that seems incomplete. For example, much of the native code (to paint directly to X11, Windows, OS X contexts) seems missing.
For my part, I’d like to see how Shoes would run if forked to be Skia-powered. Can’t seem to hook it all up just yet.
Skia can be built seperately, though.
$ git clone git://github.com/why/skistrap.git
$ cd skistrap
$ make fetch
Presuming you have the includes and libs for libpng, libjpeg, libgif and libX11, you’ll end up with libskia.so.
There’s also a
make test, but I haven’t got it hooked up to X11 quite yet, as there’s no
ports/SkOSWindow_Unix.cpp or the like. And it looks like the GL bindings it uses are for other platforms.