An image will be attempted to be cached in vram only if you copy it to an accelerated surface (a couple of times), which can either be a screen or a volatile image (on X11, though, images created with Component.createImage are always ‘accelerated’ - since they’re based in a Pixmap)
But if you want to prevent an image from being accelerated,
you can do it in a couple of ways:
- in 1.5, call Image.setAccelerationPriority(0.0) - this will prevent the image from being accelerated
- “steal” the raster of the image: call bImage.getRaster().getDataBuffer() (where bimage is a
BufferedImage) - in this case we can’t guarantee that the
cached copy will always be up to date with the system
memory surface, and so we give up any attempts to accelerate it.
Thanks,
Dmitri
Java2D Team