-
Enhancement
-
Resolution: Fixed
-
P4
-
1.4.0
-
None
-
beta
-
generic
-
solaris_7
The current implementation of the Graphics2D.drawRenderedImage method cobbles
(copies) all of the source data needed in order to draw the image into a
new BufferedImage, which is then drawn using the given AffineTransformation
(modulo a translation to deal with any change in the image origin). This
results in an extra buffer the size of the clipping region being used.
For screen updates, the clipping region will typically have a reasonable
size, but for a printing or offscreen drawing application this memory
consumption could be problematic. Avoiding the copy should also be faster.
If the desired AffineTransform consists only of an integer translation,
a more memory-efficient approach would be to draw each tile that intersects
the clipping region with the appropriate translation, without doing any
copying.
In sun.java2d.SunGraphics2D.java, there is already a "TODO" comment to this
effect from the previous release.
(copies) all of the source data needed in order to draw the image into a
new BufferedImage, which is then drawn using the given AffineTransformation
(modulo a translation to deal with any change in the image origin). This
results in an extra buffer the size of the clipping region being used.
For screen updates, the clipping region will typically have a reasonable
size, but for a printing or offscreen drawing application this memory
consumption could be problematic. Avoiding the copy should also be faster.
If the desired AffineTransform consists only of an integer translation,
a more memory-efficient approach would be to draw each tile that intersects
the clipping region with the appropriate translation, without doing any
copying.
In sun.java2d.SunGraphics2D.java, there is already a "TODO" comment to this
effect from the previous release.