JavaFX versus AWT/Swing Hardware Acceleration
Ryan Cuprak
rcuprak at gmail.com
Wed Jan 1 10:39:12 PST 2014
What is the difference between hardware acceleration in JavaFX versus Swing/AWT? I heard a while back someone claim that Swing/AWT could never fully leverage hardware acceleration. However there are the usual mix of -D parameters (sun.java2.opengl/sun.java2d.d3d, etc.) for Swing/AWT. So I am just wondering how JavaFX’s acceleration differs from the hardware acceleration in Swing. When I was giving a talk at a JUG meeting someone called me out on the hardware acceleration bit and I realized I didn’t fully understand the differences between the two.
I understand that JavaFX has a scene graph and Swing doesn’t etc. So I am assuming that the scene graph operations are optimized on the GPU whereas if you were trying to replicate a scene graph in Swing you would obviously be doing all the work on the CPU. So Swing’s hardware acceleration is more about buffers?
I did come across this article:
https://weblogs.java.net/blog/opinali/archive/2010/05/03/first-long-look-javafx-13-and-prism
Specifically this line caught my attention "Prism finally renders effects with full hardware acceleration and without the extra buffer copies that spoil effects on the Swing toolkit.”
This article is a dated - brings up a second question about hardware acceleration with a hybrid Swing/JavaFX application - what happens?
Thanks,
-Ryan
More information about the openjfx-dev
mailing list