aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt/native/drm_gbm.c
Commit message (Collapse)AuthorAgeFilesLines
* Bug 1405, Bug 1406, Bug 1408: Resolution: Call ↵egl-gbmSven Gothel2019-12-051-17/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ReleasePrimitiveArrayCritical(..) in GetPrimitiveArrayCritical(..) code path! Now that was quite a miss, causing the bugs in the first place! The freeze was caused in the JVM, as this open GetPrimitiveArrayCritical(..) disabled the GC. This was reported via '-Xcheck:jni'. Depending on the system/jvm, the freeze may happen early or only after a while. This code path was not executed with new property 'newt.disable.PointerIcon' set, but from there to finding the missing critical release - a journey: - jstack showed "main" #1 prio=5 os_prio=0 cpu=275.71ms elapsed=51.93s allocated=9710K defined_classes=472 tid=0x00007f7084015000 nid=0x1a39 waiting on condition [0x00007f70897c2000] java.lang.Thread.State: RUNNABLE at jogamp.opengl.es3.GLES3Impl.dispatch_glUniformMatrix4fv1(Native Method) at jogamp.opengl.es3.GLES3Impl.glUniformMatrix4fv(GLES3Impl.java:2585) at jogamp.opengl.es3.GLES3Impl.glUniform(GLES3Impl.java:10713) -- said that this thread was no more running, waiting on condition .. -- glUniformMatrix4fv1 was given an array! - '-Xcheck:jni' gave: Warning: Calling other JNI functions in the scope of Get/ReleasePrimitiveArrayCritical or Get/ReleaseStringCritical -- Now it is clear that the lack of releasing the critical array, returning to Java and then calling other JNI methods caused the Warning - and eventually the freeze.
* Bug 1156: NEWT DRM/GBM PointerIcon: Use hotX/hotY drmModeSetCursor2(..), ↵Sven Gothel2019-12-051-3/+5
| | | | hence pass PointerIconImpl through
* Bug 1156: Remove verbose print in native CreatePointer..Sven Gothel2019-11-301-1/+1
|
* Bug 1156: DRM/GBM: Add full PointerIcon (Cursor) SupportSven Gothel2019-11-291-0/+105
| | | | | | | | | | | | DRM allows 64x64 pixel cursor images, using GBM_FORMAT_ARGB888 only. Notable: GBM_FORMAT_ARGB888 == PixelFormat.BGRA8888 Having fixed mouse and keyboard input with previous commit, the demo com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT shows via key press - i -> pointer visible/invisible - c -> pointer icon change
* Bug 1156 - Implement DRM/GBM Support for JOGL(EGL) and NEWTSven Gothel2019-11-281-0/+83
Adding new classes DRMLib (gluegen of drm + gbm), DRMUtil and DRMMode GBMDummyUpstreamSurfaceHook to new package jogamp.nativewindow.drm, allowing full awareness of DRM + GBM within NativeWindow for JOGL + NEWT. DRMMode replaces the previous native code of collecting drmMode* attributes: active connector, used mode, encoder etc and also supports multiple active connectors. DRMUtil handles the global static drmFd (file descriptor), currently only the GNU/Linux DRM device is supported. GBMDummyUpstreamSurfaceHook provides a simple dummy GBM surface. NativeWindow provides the new nativewindow_drm.so and nativewindow-os-drm.jar, which are included in most 'all' jar packages. build property: setup.addNativeEGLGBM -> setup.addNativeDRMGBM Changes NativeWindowFactory: - TYPE_EGL_GBM -> TYPE_DRM_GBM while keeping the package ID of '.egl.gbm' for NEWT (using EGL) - Initializing DRMUtil at initialization Changes EGLDrawableFactory: - Using native GBM device for the default EGL display creation instead of EGL_DEFAULT_DISPLAY. This resolves issues as seen in Bug 1402, as well in cases w/o surfaceless support. - GL profile mapping uses surfaceless when available for GBM, otherwise uses createDummySurfaceImpl (dummy GBM surface via GBMDummyUpstreamSurfaceHook) - createDummySurfaceImpl uses a dummy GBM surface via GBMDummyUpstreamSurfaceHook - DesktopGL not available with GBM, see Bug 1401 NEWT's DRM + GBM + EGL Driver - Using DRMLib, DRMUtil and DRMMode, removed most native code but WindowDriver swapBuffer - ScreenDriver uses DRMMode, however currently only first connected CRT. - WindowDriver aligns position and size to screen, positions other than 0/0 causes DRM failure - WindowDriver reconfigure n/a NEWT TODO: - DRM Cursor support (mouse pointer) - Pointer event handling