Montag, 26. Mai 2008

X11Renderer

Today I started to play a bit with XRRenderer.
For now only fillRect was implemented (because without it all the cool demos would have been even more crappy^^), so there is plenty of work to enhance it.
I started to add draw() and fill() support, replaced some fast-path methods with redirections to general draw/fill code (because those primitives don't exist with XRender anyway) and everything which relies on drawScanlines works some kind of.
However till now I was not able to figure our howto draw a simple line with XRender which is used a lot for path() stuff. I'll have a look at it later again.

Some thing I wonder about is that the Java2D code does not seem to allow those primitives for more advanced paint states like texturepaint. For XRender it would not matter much, because any paint is textured if not done by rectangles anyway. Stepping through the OpenGL indicates that everything is done in software, only the drawImage() calls later are done by hw (however I may be wrong here of course).

Tomorrow I'll have a first look at text rendering, something I hope to get good results from.
Anyway, most apps written in java rely on text, and in its current implementation its quite inefficient when done on hardware-surfaces (like VI or Screen).

Keine Kommentare: