I changed my backbuffer also to VolatileImage
but the effect was really bad:
The FPS dropped a bit and for the worst part
when scrolling through the map and redrawing one of the buffers
it needs two seconds to do it.
With
-Dsun.java2d.trace=,count
I got the following:
27317 calls to D3DDrawLine
20 calls to sun.java2d.loops.Blit::Blit(ThreeByteBgr, SrcNoEa, IntArgb)
46 calls to sun.java2d.loops.Blit::Blit(IntRgb, SrcNoEa, IntRgb)
36 calls to sun.java2d.d3d.DelegateSwToTextureLoop::Blit(Any, SrcNoEa, "Direct3D
Texture")
4896 calls to sun.java2d.loops.DrawGlyphList::DrawGlyphList(AnyColor, SrcNoEa, A
nyInt)
276 calls to D3DDrawGlyphs
48 calls to sun.java2d.d3d.D3DMaskFill::MaskFill(AnyColor, SrcOver, "D3D render
target")
47 calls to sun.java2d.loops.MaskBlit$General::MaskBlit(Any, SrcOverNoEa, IntArg
bBm)
20 calls to sun.java2d.loops.Blit$GeneralMaskBlit::Blit(ThreeByteBgr, SrcNoEa, I
ntArgbBm)
67 calls to sun.java2d.loops.MaskBlit::MaskBlit(IntArgb, AnyAlpha, IntArgbBm)
4916 calls to sun.java2d.loops.Blit::Blit(IntArgbBm, SrcOverNoEa, IntRgb)
15 calls to sun.java2d.loops.Blit$GeneralMaskBlit::Blit(IntArgbBm, SrcNoEa, IntA
rgbPre)
47 calls to sun.java2d.loops.OpaqueCopyAnyToArgb::Blit(Any, SrcNoEa, IntArgb)
561 calls to D3DFillRect
4896 calls to sun.java2d.loops.DrawPolygons::DrawPolygons(AnyColor, SrcNoEa, Any
Int)
15 calls to sun.java2d.loops.MaskBlit$General::MaskBlit(IntArgbBm, SrcNoEa, IntA
rgbPre)
15 calls to sun.java2d.loops.Blit::Blit(IntArgbBm, SrcNoEa, IntArgb)
2537 calls to sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", A
nyAlpha, "D3D render target")
15 calls to sun.java2d.loops.MaskBlit::MaskBlit(IntArgb, AnyAlpha, IntArgbPre)
20 calls to sun.java2d.loops.MaskBlit$General::MaskBlit(ThreeByteBgr, SrcNoEa, I
ntArgbBm)
47 calls to sun.java2d.loops.Blit$GeneralMaskBlit::Blit(Any, SrcOverNoEa, IntArg
bBm)
45857 total calls to 21 different primitives
27317 calls to D3DDrawLine seems good
but what about
4916 calls to sun.java2d.loops.Blit:
and
4896 calls to sun.java2d.loops.DrawPolygons:
? Is there a way around ?