| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
library
DRM/GBM is enabled for Linux in general.
Nativewindow's 'nativewindow_drm' DRM/GBM native library is already seperated.
NEWT get its 'newt_drm' DRM/GBM native library.
NEWT's main head native library is renamed from 'newt' -> 'newt_head'
and is earmarked for further seperation similar to Nativewindow's.
At least a 'newt_wayland' will probably followup when support is added.
Goal is to remove DRM/GBM dependency for Linux X11 operation
as well as removing X11 dependency for Linux DRM/GBM operation.
|
|
|
|
| |
CapabilitiesImmutable not being GLCapabilitiesImmutable
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and not repositionable.
Our two fixed size and position console cases 'bcm.egl' and 'egl.gbm' (drm.gbm)
only operate in a console like fullscreen mode.
We should earmark and expose this behavior, as well as handle it by not waiting for a position / size
and not attempting to change position and size.
Reducing WindowImpl.minimumReconfigStateMask to bare minimum values:
STATE_MASK_VISIBLE | STATE_MASK_FOCUSED;
New WindowImpl.mutableSizePosReconfigStateMask extends WindowImpl.minimumReconfigStateMask, representing previous values:
STATE_MASK_VISIBLE | STATE_MASK_FOCUSED | STATE_MASK_FULLSCREEN | STATE_MASK_RESIZABLE | STATE_MASK_REPOSITIONABLE;
All WindowDriver implementations previously using WindowImpl.minimumReconfigStateMask
are now using WindowImpl.mutableSizePosReconfigStateMask but the explicit console driver named above.
I would have liked to add the STATE_BIT_FULLSCREEN to the current stateMask to notify this semantics,
however this would have lead to more code changes as our fullscreen mode assumes to be 'on top' of the normal mode.
Here the normal mode is essentially fullscreen and no back/forth fullscreen setting is useful or allowed.
Therefore, both fixed size & position console driver won't expose themselves as being in fullscreen mode.
|
|
|
|
| |
AppKit/EDT deadlock for parent screen location lookup
|
|
|
|
| |
screen position directly w/o locking.
|
| |
|
|
|
|
|
|
| |
earmark spanning across monitors
drmModeSetCrtc(..)'s x/y parameter are the surface's offset to be scanned out from one CRT!
|
| |
|
|
|
|
| |
(NewtCommon.c)
|
|
|
|
|
|
|
|
|
|
|
| |
XPeekEvent(..)
The wait loop uses XPeekEvent(dpy, &e),
which can block indefinite if queue is empty.
Replace with timeout only _and_ only wait on CreateWindow0(..)
not when queried via X11Display dispatch loop on events
when it is assumed the information has been propagated already.
|
|
|
|
| |
(X11Display + X11Window)
|
|
|
|
|
|
|
|
|
|
|
| |
closing)
Commit d5ba4cae824087879a4857e20961a95da04eaebb clarified and simplified the lifecycle of a PointerImpl instance, i.e. drop its resurrection in
PointerImpl.validateHandle() in favor of a hard exception.
This caused detection of subsequent PointerImpl lifecycle issues,
as instances were not fully destroyed on Display closing and
references not null'ed in Display and Screen instances.
|
|
|
|
| |
This bug never allowed a PointerIconImpl to be destroyed via PointerIconImpl.destroy()
|
|
|
|
|
|
|
|
|
| |
stdin in vsync-wait-loop
User input during test from the console will also end up in stdin of the console after the java application has been closed.
This is not only annoying, but also a security concern, as the input gets executed if containing a CR.
Further, the vsync-wait-loop shall ignore stdin.
|
|
|
|
| |
Move native handle check to pre-destruction call in PointerIconImpl.destroyOnEDT(..), unifying single destruction and all.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
hence pass PointerIconImpl through
|
|
|
|
|
|
|
| |
eglSwapBuffers(..) just in case ..
This is the poor man's SYNC: glFenceSync () with glWaitSync().
However, this change did not resolve Bug 1408. Earmarked to be removed!
|
|
|
|
| |
disables PointerIcon usage in general.
|
|
|
|
| |
decoration for PointerIcon operations
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PointerIconImpl.validatedHandle() shall not create native resource.
Semantic cleanup for clarity and equal behavior
Align DisplayImpl.createPointerIcon(..) behavior
- return null handle of createPointerIconImplChecked(..) shall be accepted,
no exception for neither of the two creation methods.
PointerIconImpl.validatedHandle() shall not create native resource.
- throws exception if handle is null (about to be used)
- no native creation shall happen here.
Display.PointerIcon.validate(): Removed, not used.
|
|
|
|
| |
swapInterval to optionally skip VSYNC if 0
|
|
|
|
| |
must be enabled via -pointerIcon
|
| |
|
|
|
|
|
|
|
|
| |
commit 453f80e38bcb0945e7eac27a5917dce9bdc6446b added disabling the tracker,
however the NEWT usage didn't cover all mouse tracker null pointer.
Further, let's initialize and spawn off the threads only at first getSingleton() call
not at class initialization earlier.
|
|
|
|
|
|
|
|
|
|
|
| |
disable each
LinuxKeyEventTracker also disable the eventX reading by default, but can be enabled via new property.
The 'return bug' (crash due to underlying console) is indeed not occuring
when using a VT w/o running console application underneath.
As Xerxes showed, one may use chvt to a free known VT or openvt.
|
|
|
|
| |
more documentation
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
keyboard event files
The time structure on 64bit machines uses two 8 byte long values instead of two 4 bytes int values on 32bit machines.
The insufficient read on 64bit machines caused an IllegalArgument exception.
This fix considers 32 or 64 bit operation.
Class renamed: LinuxEventDeviceTracker -> LinuxKeyEventTracker, as it tracks key events specifically.
Now the EventDeviceManager tries to only use /dev/input/by-id/*-event-kbd keyboard event files,
which reduces the handling on kbd event files only.
|
| |
|
|
|
|
|
|
|
|
|
| |
Mesa 18.3.6 issues mixing EGL_DEFAULT_DISPLAY and GBM device on EGL_PLATFORM_GBM_KHR
Interestingly, the issue is no more reproducible. Weird.
However, it is advised to use a real GBM device handle for EGL display creation
under EGL_PLATFORM_GBM_KHR.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- EGLSurface: Factor out 'eglCreate[Platform]WindowSurface'
NEWT egl.gbm.WindowDriver
-- Properly use GBM fourcc format and use as visualID
for GBM surface creation and EGL config selection
-- Create eglSurface within this class
-- Hook up GBM/DRM page flip (not working yet, no visible artifacts - no swap)
- ProxySurfaceImpl.surfaceSwap() call upstreamSurface's implementation if available
TODO: 'Permission denied' calling:
- drmSetMaster (optional)
- drmModeSetCrtc
- drmModePageFlip
|
| |
|
|
|
|
|
| |
getCustomClass(..) shall throw all required exceptions upstream.
Previous essential NEWT driver exception information got suppressed if failing, only disclosed in debug mode.
|
|
|
|
|
|
| |
GBM driver is now under egl/gbm subpackage and has been replaced by bcm_vc_iv boilerplate.
Native code is reentrant capable and cleaned up.
TODO: EGLDisplayUtil work with SharedResourceRunner
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Also issue the orderFront0 call within createWindow1 (aligned with IOS code)
|
|
|
|
|
|
| |
Introducing boolean property 'newt.macos.useAppKitEDTUtil', which defaults to 'false'.
If enabled, the new AppKitEDTUtil is being used, operating on the AppKit main thread.
This is used to ease debugging Bug 1393, minimizing thread context switches.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
X11Window.c's 'NewtWindows_getFrameExtends(..)'
retrieves the insets via XGetWindowProperty on _NET_FRAME_EXTENTS.
Right after window creation this method fails as the WM did not yet
provide the information as the window has not yet been mapped.
Implementation needs to retry for a certain amount of time (250ms)
and maximum number of attempts (96 XEvent).
This issue surfaced while validating fix for Bug 1393,
testing TestDisplayLifecycle02NEWT also on X11.
|
|
|
|
| |
insetsChanged + insetsVisibleChanged
|
|
|
|
| |
argument. Method only changes state.
|
|
|
|
|
|
| |
Additionally, setPointerIcon0 must also be made async on AppKit (instead of wait),
we have to assume/hope the user won't pull the PointerIconImpl instance in-between ;-)
Hence removing the comment regarding the lifecycle.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
AppKit NSWindow creation
MacOS 10.14.6 + OpenJDK11U produces occasional freezes on AppKit Main Thread
Latest manual tests after resolving Bug 1389
disclosed a few occasional freezes using NEWT + Java11.
These are related to probable AWT changes since Java8,
as these do not occur with Java8.
Fix: Spun off orderFront0(=setVisible) async off-thread on AppKit after sync AppKit NSWindow creation.
This fix also aligns the macos createWindow code with the new simplified ios implementation,
see commit 004c67c73a0309158c30929cd0d6513e23f34803
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
disableBackgroundErase (impl. semantics)
Commit 13c6bbbde5ea476d60e0a2f04a5172d3302d0edd simply removed the
AWT commonly used SunToolkit lock/unlock methods, which was incorrect.
It lead to certain resources access collisions as access has to be synchronized
using the same reentry lock across AWT and NativeWindow/JOGL.
We utilize the new com.jogamp.common.util.UnsafeUtil of GlueGen commit 07c1885e9a3d1f3a3853414648c06fb3864bc69f
to disable the IllegalAccessLogger while fetching the methods/fields and making them accessible.
JAWUtil also hosts access to SunToolkit's disableBackgroundAccess(Component)
aligning the code for GLCanvas, NewtCanvasAWT and AWTCanvas.
|