JavaFX versus AWT/Swing Hardware Acceleration
chien.yang at oracle.com
Fri Jan 3 10:33:24 PST 2014
Jim will probably has more to say about how the caching works. JavaFX
has a unified texture resource management system for Prism. An aging
algorithm is used to determine which native texture resource to be
released when the system is low on VRAM or reached a system configurable
VRAM threshold (for embedded).
On 01/03/2014 09:40 AM, Steve Hannah wrote:
>> 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.
> Can you describe roughly how the caching works? I understand that the
> alpha mask is stored in OGL as a texture, but there are an infinite number
> of possible paths to be masked. How many textures can be stored at once (on
> say an iPhone)? I'm guessing JavaFX uses some sort of LRU caching
> algorithm for these textures?
> I ask this because I've been playing around directly with the Pisces C
> library directly to generate alpha masks and render them using shaders. I
> can see a performance increase of 4x in using alpha masks rather than full
> argb pixels (due to 1 byte per pixel instead of 4), but I'm curious about
> other savings that JavaFX makes with this method.
> (Hopefully this question doesn't take this thread too far off topic... my
> hope is that the answer to this question will help shed light on the
> original poster's question also).
More information about the openjfx-dev