[OpenJDK 2D-Dev] RFR: 7183828 Invalid Image Variant when using anything other than BufferedImage

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Tue Jul 28 05:14:25 UTC 2020

Please review the fix for jdk/client.

Bug: https://bugs.openjdk.java.net/browse/JDK-7183828
Fix: http://cr.openjdk.java.net/~serb/7183828/webrev.00

Our DrawImage pipe, used as low-level machinery to draw the known type of images, supports only
three types of images:
  - ToolkitImage - implemented via ImageRepresentation.drawToBufImage()
  - VolatileImage/BufferedImage implemented via different types of "loops"

We have a type check for the ToolkitImage image only, otherwise, we assume that the image is
of type VolatileImage/BufferedImage, so if the user creates its own image and passes it to
this pipe he will get an exception.

After the fix, such custom images will be ignored by the DrawImage pipe.

Best regards, Sergey.

More information about the 2d-dev mailing list