We currently have a project on an I.MX6 processor [1] where we would like to get JavaFX working on Frame Buffer support, but without using X11.
The openjdk wiki[2] mentions about two ways to have JavaFX running on iMX6:
We are aiming for the 1 option. So instead of using the *–x11.so, we are using the *-fb.so libraries flavor from Vivante (libVIVANTE-fb.so, libEGL-fb.so, libGAL-fb.so) as described in the openjdk wiki link [2]. Everything is working, however, even when using fb set of libs, the X11 server seems to still be required in order for the EGL surface to be created.
Without x server running, javaFX will return “Could not get EGL surface” error:
root@varsomimx6:~# ./java-fb.sh -jar TurnUI.jar
Prism pipeline init order: es2
Using native-based Pisces rasterizer
Using dirty region optimizations
Using system sized mask for primitives
Not forcing power of 2 sizes for textures
Using hardware CLAMP_TO_ZERO mode
Opting in for HiDPI pixel scaling
Prism pipeline name = com.sun.prism.es2.ES2Pipeline
Loading ES2 native library ... prism_es2_monocle
Loaded /opt/java_se_embedded_8_full_release_(v1.000.002.b36)/lib/ext/../arm/libprism_es2_monocle.so from relative path
succeeded.
GLFactory using com.sun.prism.es2.MonocleGLFactory
Loaded /opt/java_se_embedded_8_full_release_(v1.000.002.b36)/lib/ext/../arm/libglass_monocle.so from relative path
at com.sun.glass.ui.monocle.AcceleratedScreen.<init>(AcceleratedScreen.java:110)
at com.sun.glass.ui.monocle.MX6AcceleratedScreen.<init>(MX6AcceleratedScreen.java:39)
at com.sun.glass.ui.monocle.MX6Platform.getAcceleratedScreen(MX6Platform.java:39)
at com.sun.prism.es2.MonocleGLFactory.initialize(MonocleGLFactory.java:107)
at com.sun.prism.es2.ES2Pipeline.<clinit>(ES2Pipeline.java:81)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:187)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:91)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
at java.lang.Thread.run(Unknown Source)
It appears that the libEGL-fb.so library that is responsible for creating a surface to draw into is returning EGL_NO_SURFACE from the eglCreateWindowSurface(...) method.
The method above egl.eglCreateWindowSurface(…) calls thru to a native monocle JaveNativeInterface(JNI) method in EGL.c which marshals arguments and passes them to the libEGL function eglCreateWindowSurface(…) and returns a handle to it.
What we would like to find out is why it can’t create a surface, for example if it can’t load a particular library i.e libx11.so
Are there any debug versions of libEGL libraries that you could provide us or is there an environmental variable (like mesa LIBGL_DEBUG=true) that can be exported to get debugging information from libEGL?
More general, is there anything else required, besides the proper Vivante *-fb.so libs, to have JavaFX without needing X11?
Thank you,
Razvan
[1] http://variwiki.com/index.php?title=DART-MX6
[2] https://wiki.openjdk.java.net/display/OpenJFX/OpenJFX+on+Freescale+i.MX6