[OpenJDK 2D-Dev] Best way organizing XRender additions for theX11 pipeline?

LOUD, Ben Ben.LOUD at baesystems.com
Wed Dec 5 01:13:42 UTC 2007


I'm not an expert, but I don't think Cairo would be appropriate for
OpenJDK, at least not as a complete Java2D implementation. Not that it
cant work, Classpath did just that quite successfully. But OpenJDK
already has a huge amount of a 2D stack implemented that they've
developed over many years including comprehensive and high quality
support for image rendering and transforming, compositing, color
mapping, text layout and rasterization etc. and its all high performing
and works great with OpenGL and D3D pipelines. 

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. That would be a real shame since
many would argue its the best in the business! (it's the main reason I
choose Java as my platform). Besides I don't think Cairo supports
anywhere near the number of image formats that Java2D does and its
hardware acceleration isnt yet in the same league. And if I remember
correctly, it doesn't support non-antialiased rendering. 

If there was anything in Cairo that Java2D could benefit from, it would
be just the part that does AA rasterizing of shapes in to tiles. But
factoring that out would probably be tricky. Besides, doing it ourselves
would be so much more fun :)

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!

-----Original Message-----
From: 2d-dev-bounces at openjdk.java.net
[mailto:2d-dev-bounces at openjdk.java.net] On Behalf Of Jesse W. Hathaway
Sent: Wednesday, 5 December 2007 1:41 AM
To: 2d-dev at openjdk.java.net
Subject: Re: [OpenJDK 2D-Dev] Best way organizing XRender additions for
theX11 pipeline?

> Hello,
> 
> I've some spare-time left so maybe I find some time to implement the
> most used software-fallbacks using XRender. There has been significant
> progress when it comes to XRender. With the EXA framework a few
> open-source drivers will soon be capable of accalerating fancy things,
> and nvidia has excellent XREnder accelaration in their latest binary
> driver.
> 
> I wonder what would be better:
> - Copy the source and implement an "XRender" pipeline replacing as
> much of X11 drawing functionality as possible.
> - Extend the existing one and let software-fallbacks there if no
> XRender is available.

Has creating a Cairo, cairographics.org, pipeline been considered? A 
Cairo pipeline would give you software fall backs as well as 
acceleration when available. Also given the increasing interest in 
using Cairo for X11 rendering its performance should only get better 
over time. Finally you could compare performance across Windows and
OSX since Cairo supports both platforms.

-Jesse
"Warning:
The information contained in this email and any attached files is
confidential to BAE Systems Australia. If you are not the intended
recipient, any use, disclosure or copying of this email or any
attachments is expressly prohibited.  If you have received this email
in error, please notify us immediately. VIRUS: Every care has been
taken to ensure this email and its attachments are virus free,
however, any loss or damage incurred in using this email is not the
sender's responsibility.  It is your responsibility to ensure virus
checks are completed before installing any data sent in this email to
your computer."





More information about the 2d-dev mailing list