Samstag, 12. Juni 2010

Xrender pipeline now in JDK7 master :)

The XRender pipeline has been integrated into the jdk7 workspace:

Thanks a lot to Phil Race who led the review-process and did many corrections and enhancements himself as I was/am rather busy right now.

This means from now on OpenJDK7/JDK7 will be shipped with the xrender pipeline included, but disabled by default for now.
The code integrated is the rewritten/new version, including the java-part of the "Jules" rasterizer-plugin which uses cairo for antialised rendering. I'll soon provide pre-built binaries of Jules for x86/amd64 as well as up-to-date sources. Whats missing is the pure-java protocol generator, its not ready yet.

In order to use the xrender pipeline simply grab a recent enough OpenJDK-7 build, or Sun's closed source JDK7-b97+ and pass -Dsun.java2d.xrender=True to the runtime.
Should work on recent Linux and Solaris distributions.

So whats next:
- Bug fixing, so grab a build and cu on OpenJDK's Bugzilla ;)
- Porting Jules to Cairo-1.10 (should improve performance when used as AATileGenerator for BufferedImage targets)
- JDK7u10 enables the pipeline by default ;)


rkennke hat gesagt…

Very cool! Congratulations!

Andrea Aime hat gesagt…

Congratulations indeed! Looking forward to test the Cairo 1.10 improvements too.

mcloud hat gesagt…


tdv hat gesagt…

Congratulations! It only took a year or so =)

Linuxhippy hat gesagt…

Hi Dmitri!

Yeah, took a while to get that stuff in, but in the end I guess the nearing JDK7 release helped to loose quality requirements ;)
At least drivers seems to be in good shape now :)

Thanks again for your support and patience, still hope the beer in vienna someday is still set?

tdv hat gesagt…

Yep, next time I'm in Vienna we're definitely meeting!

BTW, if you want my email, it's my last name at gmail dot com - it's harder to communicate here =)

Endre Stølsvik hat gesagt…

All thumbs up!!

Alan hat gesagt…

Just got around to trying the latest JDK7 build with Intellij IDEA. No joy.

After adding:

the IDE comes up with the characters in the editor pane all having black backgrounds.

This occurs with your binary build from this past summer and with the JDK7 build from a few days ago. Also, the jdk7 from a few days ago couldn't seem to find Jules...

Anyway, I'm just pointing this out just in case there's something to fix. Otherwise, thanks for all the effort on this!

Linuxhippy hat gesagt…

Hi Alan,

It would be great if you could contact me, to find out what is going wrong where.
My email is the blog's name +

- Clemens

Linuxhippy hat gesagt…

The problem seems to be caused by the Editor rendering antialiased text using the SRC operator.

Java2D seems to be more tolerating than Xrender and silently seems to switch to SRC_OVER.

I am working on it, thanks for the report!

anders hat gesagt…

I need this, but I can't make it work. I've even tried your prebuilt jre-image, but to no avail.

My test application runs on a SLES 10.1 x86 server via Exceed v.
I've also tried it on SLES 11.1 x86.

I get this error message, however:
> XRender pipeline enabled
> Allocating new blitmask: w:8 height:8
> Xrender: INFO: Jules library not installed.

After this error, Exceed crashes!

As I understand it, your prebuilt jre-image contains the Jules rasterizer, but for some reason it's not found on my system.

Alan hat gesagt…

Zowie. This is smoking now in the latest JDK7 build and using the Intellij IDEA X. Very nice.

I reported a problem last fall, and just never came back to this blog post to followup. Shame on me for that.

I probably have a worst case scenario: ssh tunnel to a !machine display. Without xrender the display performance is unusable. One can futz with pmoffscreeen settings but that only helps a little.

But Xrender in jdk7 is wonderful. Thank you for all your work on this!

Alan hat gesagt…

Sigh. I got too excited.

I can cause the Xserver to fail pretty much on demand using IDEA X. The issue seems to occur when opening a dialog window (say project setting or running tasks). Perhaps a device driver feeding up to the Xserver, I don't know. Sadly, the system I'm using is a sealed box with a VPN for secure access to a work system.

Linuxhippy hat gesagt…

Sorry for the delay guys, if you need support please come to the xrender or the 2d openjdk mailing lists.

There is an experimental switch for IntelliJ to disable the JDK checks, unfourtunatly IntelliJ currently doesn't work. There are rendering errors related to using the SRC operator in conjunction with antialiasing in the editor - I plan to fix this before JDK7 final but will take some time.

The X-Server crashes are unfourtunate, however there's nothing I can do.
There was a bug in the proprietary jdk font rasterization code which made us passing crazy values to the Xserver, but that should be fixed now.

In short, I don't have the time to support other Xservers than XOrg.
If you experience problems, you can still go back the old X11 pipeline which should work unchanged.