Donnerstag, 29. Oktober 2009

What to do with the Cairo rasterizer?

I've the cairo based rasterizer on my disk, and to be honest I don't really know what to do with it.
I'll release it hopefully soon ;)


- A lot faster than pisces, could be speeded up further by some optimizations as well as multithreading.
- Runs Java2Demo perfectly, even gets some things right pisces fails at.
- Better image quality than pisces

- Uses private cairo symbols
- Uses a modified version of cairo (one line commented out).
- Writes into C structures from Java-code
- Currently depends on the XRender pipeline code a bit.

There are some really dirty assumptions in that code that could break from one cairo version to another, but they are there for performance reasons. The more clean you make it, the more performance you loose.

Actually I don't see the modified cairo version as a bit problem itself, because if I wouldn't have used cairo and written a rasterizer from scratch in native code, the code would be there too - and nobody would care about it. The problem however is, cairo's codebase is huge, and nobody wants to integrate a private version of it of course.

Any ideas howto "solve" that dilemma? I doubt the cairo guys would open up their interface, not to the level I am using it.

Dienstag, 20. Oktober 2009

Mercurial struggles

I've today fixed the cairo bindings, to correctly generate cubic bezier curves out of quadratic ones.

I don't see any correctness bugs running Java2Demo anymore, at least when rendering to BufferedImages - rendering to VolatileImages triggers some problems in an optimized path when using Texture/Gradient paints.

However I've real troubles publishing the code. I am working on OpenJDK revision 1421, but how do I get the latest JDK without destroying my work. I executed "hg update -C" some time ago, and all files I altered were overwritten by the files in the repo.
I've already given up maintinaing my personal xrender repo, because it caused me even more struggles.
Would be glad if some mercurial gurus could assist me.