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

EmbeddedPainter uses the non-optimal readPixels() method

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Won't Fix
    • Affects Version/s: 8
    • Fix Version/s: None
    • Component/s: javafx

      Description

      Recently bug RT-24496 was filed and fixed that required the software pipeline to implement readPixels() for the EmbeddedPainter to work.

      While, arguably, every method should be implemented for completeness, anyone calling readPixels() should have tried getPixels() first and only back off to readPixels() if the get method returned a null. getPixels() avoids a copy on pipelines that have exposed pixels and should be used for performance considerations. Since getPixels() cannot be easily implemented on hardware pipelines they return null from getPixels() and implement readPixels() instead to expose the data copying (again so that the caller is in control of the storage requirements), but getPixels() should be called in preference to readPixels() in pretty much all cases unless, perhaps, the caller would have just turned around and made a copy for persistance reasons (typically they are going to send the data to a platform mechanism which will make its own copies internally so it should be extremely rare that the caller needs to keep a copy for its own needs).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              morris Morris Meyer (Inactive)
              Reporter:
              flar Jim Graham
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported: