Hi all,
I’m aware that all managed images will be accelerated with no size constraints according to this thread by trembovetski:
Assuming of course that there is enough VRAM available.
Then I’m puzzled as to why this BufferedImage with BITMASK transparency created using this piece of code doesn’t seem to get accelerated:
[quote]squareBuffer = Globals.GC.createCompatibleImage(playerBounds.width, playerBounds.height, Transparency.BITMASK);
[/quote]
The width of that image created is 364 px, and the height is 700 px.
How I tell that it ISN’T accelerated is by using JProfiler to trace method invocations made by sun.java2d.SurfaceData.getSurfaceDataFromImage, and it calls sun.awt.image.BufImgSurfaceData.createData. If it was accelerated with BITMASK transparency, it should be calling sun.awt.image.AcceleratedOffScreenImage.getSourceSurfaceData instead.
Information on the environment I’m runnng in:
This WORKS however:
[quote]squareBuffer = Globals.GC.createCompatibleImage(playerBounds.width / 10, playerBounds.height / 10, Transparency.BITMASK);
[/quote]
I’ve got translucent acceleration enabled and this WORKS:
[quote]squareBuffer = Globals.GC.createCompatibleImage(playerBounds.width, playerBounds.height, Transparency.TRANSLUCENT);
[/quote]
And this too:
[quote]squareBuffer = Globals.GC.createCompatibleImage(playerBounds.width, playerBounds.height, Transparency.OPAQUE);
[/quote]
So, does size actually matter with regards to BITMASK transparency managed images? Or did I miss something?
I’d appreciate it if someone could clarify. Thanks.