[OpenJDK 2D-Dev] Graphics2D.fill(Shape) operation always fails with a custom Composite

Rami Hänninen rami.hanninen at documill.com
Fri Jun 27 08:39:24 UTC 2014

Dear OpenJDK 2D developers community.

I have found a nasty 2D rendering bug in the latest OpenJDK 1.7.60
version. It probably affects all other OpenJDK versions, too. The bug
does not appear in OracleJDK, so this is purely an OpenJDK issue.

I do not know of any other place where to report this issue, so I'm now
submitting my small test program to this mailing list (attached). The
test program demonstrates the bug, and also documents my findings in detail.

I have tracked the bug into 'sun.java2d.pisces.PiscesCache' and
'sun.java2d.pipe.AAShapePipe' classes, but I do not understand the
theory behind the Java rendering pipelines well enough to suggest a
patch. I think that the problem should be easy to fix for anyone
familiar with the rendering pipelines and corresponding "tiling" technique.

I think so because this is a Pure Java issue, it seems to be a simple
"off by one pixel" kind of error, and because all the other pipe
implementations except 'AAShapePipe' seem to work, and also because
corresponding OracleJDK implementation works.

I also think this is a very relevant bug in general, because in its'
current state, OpenJDK can't be reliably used for anti-aliased rendering
that also uses custom Composite implementations. Both of these features
are absolutely required for any high-quality graphical applications,
including the one I'm developing. That application is also already in
widespread international use, and it's a real shame that users now have
to choose between perfect OracleJDK and crappy OpenJDK results.

I'm happy to answer questions and provide addition information if
necessary. I also just joined this mailing list, so I will be monitoring
any discussion this message may spur.

  Best regards

    Rami Hänninen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenJDKFillBug.java
Type: text/x-java
Size: 5941 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20140627/5578ab69/OpenJDKFillBug.java>

More information about the 2d-dev mailing list