-
Enhancement
-
Resolution: Won't Fix
-
P4
-
None
-
8
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).
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).
- relates to
-
JDK-8125744 SW Pipeline: UnsupportedOperationException in SwingInterOp
- Closed