JavaFX versus AWT/Swing Hardware Acceleration
chien.yang at oracle.com
Fri Jan 3 09:46:30 PST 2014
The Graphics Support section in this link has a detail information on
the list of GPUs JavaFX can take advantage of:
Note: Linux and Mac should have the same support coverage except for
Intel GMA 4500 which we haven't tested.
On 01/03/2014 09:24 AM, Kevin Rushforth wrote:
> A couple other thoughts.
> 1) JavaFX doesn't use software loops for the actual rendering as long
> as the card is capable of supporting Prism. We do mix HW and SW in
> that we generate masks from a path in SW, but we cache that on the
> card and render it using shaders.
> 2) JavaFX can support Intel HD on Windows (something in the way Java2D
> uses D3D exposes a bug in Intel's driver so it is disabled).
> Jim can probably come up with more.
> -- Kevin
> Stephen F Northover wrote:
>> 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 buffers?
>>> 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
More information about the openjfx-dev