Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8059942

Default implementation of DrawImage.renderImageXform() should be improved for d3d/ogl

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 9
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
      2d
    • Resolved In Build:
      b44
    • CPU:
      generic
    • OS:
      generic

      Backports

        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.

          Issue Links

            Activity

            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/785732b1971f
            User: lana
            Date: 2014-12-23 22:27:55 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/785732b1971f User: lana Date: 2014-12-23 22:27:55 +0000
            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/client/jdk/rev/785732b1971f
            User: serb
            Date: 2014-11-28 10:47:59 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/client/jdk/rev/785732b1971f User: serb Date: 2014-11-28 10:47:59 +0000
            Hide
            serb Sergey Bylokhov added a comment -
            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
            Show
            serb Sergey Bylokhov added a comment - 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
            Hide
            serb Sergey Bylokhov added a comment - - edited
            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.
            Show
            serb Sergey Bylokhov added a comment - - edited 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.
            Hide
            serb Sergey Bylokhov added a comment -
            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)
            Show
            serb Sergey Bylokhov added a comment - 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)

              People

              • Assignee:
                serb Sergey Bylokhov
                Reporter:
                serb Sergey Bylokhov
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: