[OpenJDK 2D-Dev] [9] Review Request: 8039774 [OGL] Image painting is broken if 'sun.java2d.accthreshold' is set to 0 (original) (raw)
Andrew Brygin andrew.brygin at oracle.com
Fri Apr 11 08:28:44 UTC 2014
- Previous message: [OpenJDK 2D-Dev] [9] Review Request: 8039774 [OGL] Image painting is broken if 'sun.java2d.accthreshold' is set to 0
- Next message: [OpenJDK 2D-Dev] RFR [8009637]: Some error messages are missing a space
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello Sergey,
the fix looks fine.
Thanks, Andrew
On 4/10/2014 3:45 PM, Sergey Bylokhov wrote:
Hello. Please review the fix for jdk 9. The bug occurs, when we try to call drawImageBg with scale and 'sun.java2d.accthreshold' is set to 0.
The bug exists in the DrawImage.renderImageXform(). This method is called, when all our attempts to scale the image fails, and we create a buffered image, and use it as intermediate buffer. Note that the buffered image has predefined image type (TYPEINTRGB/TYPEINTARGB), because we know that for these types we have necessary tranform helpers. So if "sun.java2d.accthreshold" set to 0 the next code [1] is broken, because dstData.getSourceSurfaceData() returns cached version of the surface, which is unexpected. [1]: srcData = dstData.getSourceSurfaceData(img, SunGraphics2D.TRANSFORMGENERIC, sg.imageComp, null); srcType = srcData.getSurfaceType(); helper = TransformHelper.getFromCache(srcType); !!!!! helper is null here. I can reproduce the problem on OGL, and sure that it will be reproduced on d3d as well. BTW: we have to do something with this code path because DrawImageBg() in this scenario 10000 slower than DrawImage(). Bug: https://bugs.openjdk.java.net/browse/JDK-8039774 Webrev can be found at: http://cr.openjdk.java.net/~serb/8039774/webrev.00
- Previous message: [OpenJDK 2D-Dev] [9] Review Request: 8039774 [OGL] Image painting is broken if 'sun.java2d.accthreshold' is set to 0
- Next message: [OpenJDK 2D-Dev] RFR [8009637]: Some error messages are missing a space
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]