What is the Windows (and Linux?) equivalent of the Apple Java property apple.awt.graphics.UseQuartz?
For my application drawing with Graphics2D increases in speed by about 5 times when I set
System.setProperty("apple.awt.graphics.UseQuartz","true");
Is there a known equivalent for other platforms to take advantage of hardware acceleration?
Edit: I should point out that on Windows I believe it's not accelerated because it's running a lot slower than on my Mac despite the Windows machine having much much more powe开发者_Python百科rful CPU and GPU.
You can turn on OpenGL optimization:
System.setProperty("sun.java2d.opengl","true");
You can see Java's full list of system properties for Java2D for more.
Note that I tried this, and it seemed to have no effect when I called System.setProperty
on this. In order to have any effect, I had to use -Dsun.java2d.opengl=true as a VM argument. Even then, when I did it, it slowed down my application significantly. I did most of my testing with our most custom Swing component, which did a lot of painting directly with the Graphics2D
object. It also interfered with our ability to probe the screen dimensions. So I leave this property off. You might find some other helpful properties in the link, however. This testing was done under Linux.
精彩评论