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

Jim Graham james.graham at oracle.com
Sat Feb 8 00:56:33 UTC 2014

Hi Anton,

In CPlatformLWWindow.java, why does it have to search for the right 
device when it was created with/from a Window object that should already 
know the right device?

SG2D, line 2114 - I think TRANSFORM_SCALE allows negative scale factors 
so I think you need a little more protection from the transform call 
reversing the rectangle.

Otherwise, I didn't spot any other issues...

On 2/3/14 6:36 AM, Anton V. Tarasov wrote:
> In SG2D, the drawHiDPIImage, for instance, makes a call to
> op.filter(img, null); where the img is expected to return its layout
> size. That's why I still prefer to use the setReturnLayoutSize
> "switcher", in order not to go deep into the 2D rendering code, casting
> here and there to OffscreenImage and calling getLayoutWidth/Height.

Would we expect one of these images to have the BufferedImageOp version 
of drawImage be used on it?  (It could happen if we ever leak the object 
into developers hands, but I'm not sure if that can happen or not - I'm 
pretty sure we don't use those Ops internally ourselves, do we?)


More information about the 2d-dev mailing list