[OpenJDK 2D-Dev] <AWT Dev> [9] Review Request: JDK-8029455 JLightweightFrame: support scaled painting

Jim Graham james.graham at oracle.com
Sat Feb 1 01:35:26 UTC 2014

Hi Anton,

On 1/31/14 6:37 AM, Anton V. Tarasov wrote:
> My understanding is that, unless the fix is absolutely irrelevant (whic
> I hope it isn't), we should integrate it into 9/8u20 to support
> SwingNode in its current implementation on Retina displays.
> What do you think?

I agree with this sentiment.  My suggestion for reducing its footprint 
aside (which it looks like you are investigating), the main thing I will 
be looking for is whether or not we return an object to a developer 
(i.e. it isn't just managed internally to our own code) where they can 
do "instanceof BufferedImage" and then see something odd coming from its 

It looks like if we simply use getLayoutWH() internally then they would 
never ever see anything odd from getWidthHeight() anyway.  The only 
additional "gotcha" would be if they grab the image and render it 
directly and it comes out an unexpected size to them (because, for 
instance, they didn't check the layout dims like we do internally). 
That's a pretty minor issue, though, and I think we could live with it.

For 9.0 perhaps we could add the LayoutWH() as new API on BufferedImage 
and then most of this would be public?  I'd have to mull over if that 
makes sense and I'm not entirely sure of the naming yet...


More information about the 2d-dev mailing list