JDK-8059942 : Default implementation of DrawImage.renderImageXform() should be improved for d3d/ogl
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2014-10-08
  • Updated: 2015-06-04
  • Resolved: 2014-11-28
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u40Fixed 9 b44Fixed
Related Reports
Relates :  
Relates :  
Description
Default implementation of DrawImage.renderImageXform() tries to blit an image scanline by scanline to a destination, which is extremely slow. It should have an option to blit results at once using one blit, probably via intermediate buffer. 
Comments
I have removed optimizations related to additional clipping and make a change smaller: Version 7: http://cr.openjdk.java.net/~serb/8059942/webrev.07 Results: http://cr.openjdk.java.net/~serb/8059942/ogl_intel_osx-fix7/results.txt Summary: base: Number of tests: 216 Overall average: 182823.53598524662 Best spread: 0.0% variance Worst spread: 10.09% variance (Basis for results comparison) fix7: Number of tests: 216 Overall average: 183584.35922308348 Best spread: 0.07% variance Worst spread: 7.62% variance Comparison to basis: Best result: 11300.14% of basis Worst result: 97.18% of basis Number of wins: 72 Number of ties: 143 Number of losses: 1
22-10-2014

Initial version of the fix: http://cr.openjdk.java.net/~serb/8059942/webrev.00 j2dbench: config: http://cr.openjdk.java.net/~serb/8059942/ogl_intel_osx-fix1-fullsurfaceread/xform Results: http://cr.openjdk.java.net/~serb/8059942/ogl_intel_osx-fix1-fullsurfaceread/results.txt Summary: base: Number of tests: 480 Overall average: 227.5838704455941 Best spread: 0.0% variance Worst spread: 17.09% variance (Basis for results comparison) fix: Number of tests: 480 Overall average: 11356.38787256755 Best spread: 0.1% variance Worst spread: 10.1% variance Comparison to basis: Best result: 37258.06% of basis Worst result: 0.53% of basis Number of wins: 360 Number of ties: 0 Number of losses: 120 It seems that the fix can be improved further for a small 1x1 images.
15-10-2014

Note that this default implementation is called if: - Xor/Custom composite + transform - bicubic interpolation is specified - a background color is specified and will be used - the source surface is neither a texture nor render-to-texture surface, and a non-default interpolation hint is specified (we can only control the filtering for texture->surface copies)
08-10-2014