Google Skia

So Google recently released a browser called Chrome, making it ever easier for them to deliver advertisements to your computer screen. But more interestingly, its components are released under various free licenses. They have opened up a rather sizeable repository littered with (third party) Windows binaries -- in case you might want to link against them, I guess (?) -- and a source code drop.

The interesting bit about the source code drop is that it also has various support libraries, among which is one called "Skia". Its main purpose appears to be graphics rendering. The good news does not end here, because the rendering appears to be a scanline-based system. Scanline based renderers are -- as of writing -- the fastest renderers around. The Antigrain library, which happens to be Gnash's default renderer, is also a scanline renderer.

Cairo, which has always used more traditional rendering techniques, is now also looking to benefit from the scanline performance. See scanline Summer of Code status blog. (Summer of Code, I note, is also a Google project...)

Antigrain unfortunately is a difficult library to use. This is where Skia appears to be different, because its interface is fairly simple. Although it does have a few of the bad habits Antigrain has -- lack of constructors, no error handling, C-style casts -- it appears to be rougly on feature par with Cairo.

So how does the performance compare with Cairo and Antigrain? Since the code drop is only a couple of days old, we'll have to wait for benchmarks. The Webkit project has already started merging it, though; word has it one of the Google engineers works on Webkit.

For now, I checked out the Skia sources and, after hacking the build scripts, I was able to compile it to play around with it. So perhaps we'll see a Skia renderer for Gnash at some point.