SunGraphics2D instead of Graphics2D
neugens.limasoftware at gmail.com
Mon Nov 21 07:55:32 PST 2011
Il giorno 19/nov/2011, alle ore 00:17, Mario Torre ha scritto:
> Hello all,
> While developing our Swing/JavaFX integration  I've found that with the aqua look and feel it doesn't paint correctly, unless I set the awt.nativeDoubleBuffering to false.
> The reason for this is that internally, Graphics2D objects are casted to SunGraphics2D, probably this is a left over for some specific optimizations in the Apple JDK, but from the current OpenJDK code I can't see any reason for that cast to exist.
> The problem surfaces because we use a special component to proxy heavyweight behavior to the Java FX view and to provide graphics and all the usual goodies that the swing hierarchy wants.
> In particular, the graphics object for the heavyweight component is a proxy graphics that wraps a BufferedImage.
> Since those cast gets in the way only when native double buffering is enabled on the Mac, I can workaround for older JDK releases, but I would really like to see if this fix can be pushed in for OpenJDK 7.
> The webrev for the patch is here:
> Any comments?
>  Some links:
Any comments on this one?
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA FC7C 4086 63E3 80F2 40CF
Proud GNU Classpath developer: http://www.classpath.org/
Read About us at: http://planet.classpath.org
Please, support open standards:
More information about the macosx-port-dev