Learning Prism

Jeffrey Guenther guenther.jeffrey at gmail.com
Thu Mar 10 17:50:23 UTC 2016

Thanks for the tips Johan and Morris! Very helpful!

> On Mar 8, 2016, at 3:22 AM, Johan Vos <johan.vos at gluonhq.com> wrote:
> Hi,
> I think the best way to get started really depends on your personal preferences (e.g. do you like to read code, docs, diagrams,...).
> I can only comment on how I do it, but others may have other approaches:
> First of all, you can run a simple JavaFX apps with lots of verbose info. See com.sun.prism.impl.PrismSettings for a list, and have at least prism.verbose set to true. This already gives you lots of insight in what is happening.
> Second, you want to know what happens on a pulse. Although many complex things are happening, this is not very hard to detect from the code: start from QuantumToolkit.pulse() and follow it from there. There are basically two main parts: 
> * do the calculations (on the FX Thread) (e.g. look at Scene.ScenePulseListener.pulse())
> * do the rendering (PaintCollector.renderAll() which will ultimately call QuantumRenderer.submitRenderJob() which runs on the Prism thread).
> - Johan
> On Tue, Mar 8, 2016 at 5:34 AM, Felix Bembrick <felix.bembrick at gmail.com <mailto:felix.bembrick at gmail.com>> wrote:
> +1
> I too would love to dive as deep as possible and improve anything that
> needs improving so some guidance would help greatly!
> Felix
> On 8 March 2016 at 14:45, Jeffrey Guenther <guenther.jeffrey at gmail.com <mailto:guenther.jeffrey at gmail.com>>
> wrote:
> > Hi Devs,
> >
> > I’m interested in learning more about JavaFX’s low level graphics
> > implementation. I’ve spent a couple afternoons source diving in the
> > modules/graphics folder to get the lay of the land and now I think I need
> > some help. Can anyone point me to documentation describing the system’s
> > high level design? Let’s say one or two levels deeper than
> > http://docs.oracle.com/javafx/2/architecture/jfxpub-architecture.htm <http://docs.oracle.com/javafx/2/architecture/jfxpub-architecture.htm>? <
> > http://docs.oracle.com/javafx/2/architecture/jfxpub-architecture.htm <http://docs.oracle.com/javafx/2/architecture/jfxpub-architecture.htm>?>
> >
> > Ultimately, I’d like to gain a better understanding on how JavaFX lays out
> > and renders text for the purposes of understanding how I might be able to
> > contribute to a more advanced text API with support for things like kerning.
> >
> > Secondly, can anyone explain to me how shaders are compiled and passed
> > down to the graphics layer? I’d like to gain a better understanding of how
> > a JavaFX programmer could leverage/add to Prism such that we can write
> > custom shaders/GPU kernels for Effects nodes.
> >
> > I realize the graphics system in JavaFX is not for the faint of heart.
> > There’s much going on beneath the surface. I’m willing to dive deep and do
> > the learning to understand the design. Can anyone point me to docs where I
> > can get started? Or maybe which class to start with and work out from when
> > I’m source diving?
> >
> > Jeff

More information about the openjfx-dev mailing list