Hi Ryan,

I'll let others describe hardware acceleration in AWT/Swing but in JavaFX, D3D and ES2 shaders are used to draw. These run directly on the graphics card and render data that is downloaded there. Because JavaFX has a scene graph, it has a notion of what has been changed and can render only a subset of the scene graph nodes.

This is a very high level description of JavaFX but captures the essence of what is happening. Any other FX committers want to comment?


On 2014-01-01 1:39 PM, Ryan Cuprak wrote:
  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 

  I did come across this article:
  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?


Reply via email to