Is there a way to determine if Java FX uses hardware acceleration?

And what is connected with this, is there a way to force Java FX to use hardware acceleration and a bomb if it cannot?

+4
source share
3 answers

Just found out:

You can run with -Dprism.verbose=truewhich will print which graphics pipeline it uses. "sw" or "j2d" for software and "d3d" or "es2" for hardware acceleration.

+14
source

You can also try this hack.

@SuppressWarnings("restriction")
static String getCurrentGraphicsPipeline() {
    return com.sun.prism.GraphicsPipeline.getPipeline().getClass().getName();
}

"com.sun.prism.sw.SWPipeline", . , , , .

+2

If you use eclipse as an IDE, you need to pass these arguments to VM. You can add these VM arguments to the runtime configuration.

Put these arguments: -Dprism.verbose=true

Have a look at the image for more information

0
source

All Articles