Is it a clean way to short-circuit the render path?

Neacsu Cristian neacsu.cristianstefan at
Thu Sep 21 12:32:40 UTC 2017

I am not sure that there is the proper place to ask this, but I spent
a lot of time reading documentations, looking at presentations and
debugging the source code. Please accept my apologizes if I post this
in the wrong place. Thank you.

Let's imagine this structure:

Pane - scene pane
    Pane - button pane
        ImageView - image of the button
        TextView - text of the button

Therefore we have a root scene pane and a button. In the moment when I
hover the button, I will change the ImageView. Therefore the default
render path returned will be [Scene pane, Button Pane, Image View]
shown with -Dprism.printrendergraph=true.

The main problem is that for certain scenarios I do not need to render
the complete path. In other words, I do not need to render anything
above (parent, grand parent etc.) Button Pane, because I know already
that my button is an opaque rectangle image.

The current behavior (as far as I was able to debug) of the View
Painter: First is determine the dirtyRegionContainer. Then is calling
the root path regions (getRootPath) and is going to try to see which
elements are overlapping the dirty region. In our case is going from
the scene root, is seeing that it will overlap therefore will be
rendered (marking the culling bits to
DIRTY_REGION_INTERSECTS_NODE_BOUNDS), than is looking for all the
children, than is picking those which intersect/contains the dirty
region and so on. But there is no need (at least in the current
scenario) to render those NGNodes that do not contain the dirty
region. Or much simpler, the root path should start with the node that
is the source of the dirty region (in the current case, the Button
Pane, excluding the Scene pane).

Is it a clean way to achieve this?

Thank you in advance,

More information about the openjfx-dev mailing list