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

OGL: createImage() should return a regular managed image

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 6
    • 5.0
    • client-libs
    • 2d
    • beta
    • 5.0
    • b33
    • generic, x86
    • solaris_9, windows_xp

      Currently, Component.createImage() will return a special kind of managed
      image when OGL is enabled. This kind of image will have a pbuffer-based
      surface as its primary surface, instead of the usual BufImgSurfaceData.
      This is problematic for a number of reasons:
        - in theory, a pbuffer can be lost at any time, but we have no way
          of communicating this surface loss event to the application making use
          of the offscreen image (it's not a VolatileImage, after all)
        - even though createImage() is spec'ed to return an Image, historically
          we have returned a BufferedImage variant, so some developers have come
          to rely on being able to treat the returned object as a BufferedImage;
          however, the mechanism for getRGB()/setRGB() is extremely slow for
          this kind of image, especially now with STR
        - since the image is backed by a pbuffer, performance of copying from
          the image is not as good as if it was backed by a texture (i.e.
          performance is not as good as a regular managed image)
        - the code is complex and fragile

      For these reasons, and many others, we should eliminate this special code
      and simply rely on "regular" managed images for this case.
      ###@###.### 2005-03-15 08:02:28 GMT

            campbell Christopher Campbell (Inactive)
            campbell Christopher Campbell (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: