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

Copying of overlapping memory should be improved in java2d

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 9
    • Fix Version/s: tbd
    • Component/s: client-libs
    • Labels:
      None
    • Subcomponent:
      2d
    • CPU:
      generic
    • OS:
      generic

      Description

      The sample code below will call the IsomorphicCopy method which call memcpy on the overlapping memory.

           BufferedImage img = new BufferedImage(100, 100, BufferedImage.TYPE_INT_ARGB_PRE);
           Graphics2D g = img.createGraphics();
           g.setComposite(AlphaComposite.Src);
           g.drawImage(img, 0, 0, null);
           g.dispose();

      http://linux.die.net/man/3/memcpy
      "The memcpy() function copies n bytes from memory area src to memory area dest. The memory areas must not overlap. Use memmove(3) if the memory areas do overlap"

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            serb Sergey Bylokhov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: