Dienstag, 8. September 2009

Running Java2Demo on cairo's tesselator

I've just sorted out the worst problems, and its possible to run Java2Demo using the Cairo based rasterizer now. The hardest part was a small bug in cairo, which was caused by the uncommon situation how cairo is used.

Performance is excellent compared to pisces, and quite good compared to ductus.
By implementing more specific functionality (not only draw/fill) it should be possible to get even better performance for common cases like arcs or ovals.


A drawback is that this rasterizer backend needs a private version of cairo, because its tapping a lot into cairo internals. Hopefully this will find its way into IcedTea some day...

Kommentare:

rkennke hat gesagt…

Very impressive! Tapping into internals is quite ugly though...

mwielaard hat gesagt…

Nice! How "private internals" is it? Any possibility to discuss/negotiate public APIs for anything you used?

Did you publish the sources somewhere?

Linuxhippy hat gesagt…

Hi Mark!

I guess too private to get it into public. It could be done in an "official" way, but at the cost of performance.

My original intention was to extract the tesselator out of cairo - but almost everything I needed was covered by private apis, so for now I simply link a slightly modified cairo statically.
So I think the outcome "use slightly modified cairo version" compared to the original goal "extract tesselator code and maintain it" is not that bad.
The modifications could be merged into cairo with some lobbying I guess ;)

The code is not public for now. I'll make a first drop soon, but I would like to finish implement the AATileGenerator interface too - for non-xrender surfaces to replace pisces also for BufferedImage surfaces.