[OpenJDK 2D-Dev] Best way organizing XRender additions for theX11 pipeline?
cworth at cworth.org
Wed Dec 5 08:15:55 UTC 2007
On Wed, 5 Dec 2007 11:43:42 +1030, "LOUD, Ben" wrote:
> I'm not an expert, but I don't think Cairo would be appropriate for
> OpenJDK, at least not as a complete Java2D implementation.
I've been involved with the cairo implementation since the beginning,
(and even before that). I don't know a *lot* about Java2D but you're
probably quite right that there are likely to be things missing in
cairo that would be needed for a complete Java2D implementation.
> As far as I can tell, Cairo only exposes a high level API (like Java2D)
> so to use it, you would probably have to throw away all the existing
> OpenJDK Java2D code in order to use it.
I'm really not sure what that means exactly.
> But if there are X11 drawing calls that can be replaced with XRender
> then I'd be all for that! I know almost nothing about *nix graphics
> technologies. Maybe someone can enlighten me on the details. It looks
> like it can do compositing, image affine transforms, image convolution
> (nice!), glyph caching and even linear and radial gradients. Does Java2D
> not take advtange of any this yet? Sounds like a promising oppertunity.
> But the only documentation I could find on it was sketchy. It looks like
> it can make surfaces in VRAM and do compositing entirely in hardware. It
> might then have potential to perform as well as OpenGL. Definitely worth
> exploring! Go for it Clemens!
Yes, the X Render extension does support that list. And honestly, the
reason it isn't better documented is that we wrote cairo specifically
to be an easier-to-use interface for X Render functionality[*].
So if you do want to start using Render inside Java2D, (which seems
only a good thing when targeting an X server), the recommended
approach would be to use cairo to do that. This wouldn't mean that you
would have to use cairo to replace other existing non-X backends in
Java2D at all, of course.
If anyone is interested in exploring this further, I'd be more than
happy to answer any questions about cairo's functionality, how to use
it, or how it might be improved in the future.
[*] Initial versions of cairo were strictly targeting X Render---the
capability of targeting Win32, Quartz, PostScript, PDF, SVG, OpenGL,
etc. all came much later.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
More information about the 2d-dev