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

IntegerInterleavedRaster can be sped up further

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.3.0
    • 1.3.0
    • client-libs
    • 2d
    • kestrel
    • generic
    • solaris_7

        Bug 4254028 indicated a way to speed up the implementation of the method
      IntegerInterleavedRaster.setDataElements, which is used heavily by Adobe's
      Java acrobat reader (javacrobat). The suggestion comes from a SCSL licensee.

        The suggested fix is reasonable but is in fact more general than necessary.
      An IntegerInterleavedRaster is required to have a SinglePixelPackedSampleModel,
      which always has numDataElements == 1, and also enforces pixelStride == 1.
      Therefore a number of methods may be simplified and in particular the
      get/setDataElements methods can use System.arraycopy which should result
      in a further speedup.

        Other methods can also benefit from being able to assume that pixelStride ==
      numDataElements == 1. The class should probably be marked final or other
      steps taken to ensure that the existence of this constraint is understood
      by anyone who wishes to modify this class.

        The techniques suggested could still be applicable to other Raster subclasses.

        The new code is supplied in the "Suggested Fix" section.

            jehung Jeannette Hung (Inactive)
            dricesunw Daniel Rice (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: