[OpenJDK 2D-Dev] [9] Review Request: 8062164 Incorrect color conversion, when bicubic interpolation is used

Jim Graham james.graham at oracle.com
Mon Oct 27 18:12:48 UTC 2014

Hi Sergey,

In the test case you call new BufferedImage() with a Transparency 
constant which is essentially a random number to determine the type of 
BufferedImage since it is expecting its own values.  You get lucky with 
the value of the integer as it turns out, but the test case really 
should be using the constants from BufferedImage in its own constructor 
instead (too bad we didn't have typed enums back when this was all 

Also, a test case with an infinite loop should either have a timeout, or 
a limit on "retries" in the loop - just in case we ever run the test in 
an environment where VIs fail for some reason...


On 10/27/14 8:57 AM, Sergey Bylokhov wrote:
> Hello.
> Please review the fix for jdk 9.
> Type of the temporary buffer in DrawImage.renderImageXform() is
> incorrect. Note that we blit this buffer to the destination, using next
> maskblit/blit:
> line 463: maskblit = MaskBlit.getFromCache(SurfaceType.IntArgbPre,
>                                               sg.imageComp,
>                                               dstType);
> line 489: blit = Blit.getFromCache(SurfaceType.IntArgbPre,
>                                       sg.imageComp,
>                                       dstType);
> Type of source surface is IntArgbPre in both cases, but the type of
> tmpBuffer is IntArgb.
> Bug: https://bugs.openjdk.java.net/browse/JDK-8062164
> Webrev can be found at: http://cr.openjdk.java.net/~serb/8062164/webrev.01

More information about the 2d-dev mailing list