Source code for JavaFX UI controls now available on openjfx

Roman Kennke roman at kennke.org
Sat Dec 3 05:57:25 PST 2011


> I am not the right person to answer this question but Richard said that 
> Jasper has been working
> on this for a week or so and from what I have read it sounds to me as if 
> this could be a very
> efficient implementation.

It's not clear from this thread if there's already work being done on
this, or if they are only thinking about possible solutions. Notably:

"But then we thought we were freaking idiots for not just doing a
Canvas2D Node in the embed package that had normal AWT APIs. In the
first instance it could be dumb and just do an image copy, and then get
upgraded to do direct texture stuff (there is some additional
complication there, notably, the splitting of the rendering and event
threads, but anyway). In any case it should be more than fast enough. So
that's kind of where we're at."

The first part, i.e. image copy, is exactly what we do. We have a
BufferedImageView, which renders BufferedImage in JavaFX, and we provide
a Graphics2D which can paint on it. It's fairly dumb because we couldn't
use or change any internals of JavaFX, but it works well, and it's not
*that* slow.

Now... if there's more than this already done in JavaFX @ Oracle, we can
scrap this and use what's in JavaFX. On the other side, if this is not
the case, our implementation could be used as starting point and
improved over time. (We need the other parts of the JavaFX sources to
help with this!)

Roman




More information about the openjfx-dev mailing list