Skip to content
The Jenkins Controller is preparing for shutdown. No new builds can be started.
Unstable

Changes

Summary

  1. Fix Bug 616: X11: Remove XInitThreads() dependency while cleaning up (details)
  2. FBObject: Clarify reset(..), resetSamplingSink(..) ; Rename (details)
Commit fbe331f013608eb31ff0d8675f4e4c9881c9c48b by Sven Gothel
Fix Bug 616: X11: Remove XInitThreads() dependency while cleaning up device locking, resulting in a native-lock-free impl.

The X11 implementation details of NativeWindow and NEWT used the X11 implicit locking facility
XLockDisplay/XUnlockDisplay, enabled via XInitThreads().
The latter useage is complicated within an unsure environment where the initialization point of JOGL
is unknown, but XInitThreads() requires to be called once and before any other X11 calls.

The solution is simple and thorough, replace native X11 locking w/ 'application level' locking.
Following this pattern actually cleans up a pretty messy part of X11 NativeWindow and NEWT,
since the generalization of platform independent locking simplifies code.
Simply using our RecursiveLock also speeds up locking, since it doesn't require JNI calls down to X11 anymore.
It allows us to get rid of X11ToolkitLock and X11JAWTToolkitLock.

Using the RecursiveLock also allows us to remove the shortcut of explicitly createing
a NullToolkitLocked device for 'private' display connections.
All devices use proper locking as claimed in their toolkit util 'requiresToolkitLock()' in X11Util, OSXUtil, ..

Further more a bug has been fixed of X11ErrorHandler usage, i.e. we need to keep our handler alive at all times
due to async X11 messaging behavior. This allows to remove the redundant code in X11/NEWT.

The AbstractGraphicsDevice lifecycle has been fixed as well, i.e. called when closing NEWT's Display
for all driver implementations.

On the NEWT side the Display's AbstractGraphicsDevice semantics has been clarified,
i.e. it's usage for EDT and lifecycle operations.
Hence the X11 Display 2nd device for rendering operations has been moved to X11 Window
where it belongs - and the X11 Display's default device used for EDT/lifecycle-ops as it should be.
This allows running X11/NEWT properly with the default usage, where the Display instance
and hence the EDT thread is shared with many Screen and Window.
Rendering using NEWT Window is decoupled from it's shared Display lock
via it's own native X11 display.

Lock free AbstractGraphicsDevice impl. (Windows, OSX, ..) don't require any attention in this regard
since they use NullToolkitLock.

Tests:
======
This implementation has been tested manually with Mesa3d (soft, Intel), ATI and Nvidia
on X11, Windows and OSX w/o any regressions found in any unit test.

Issues on ATI:
==============
Only on ATI w/o a composite renderer the unit tests expose a driver or WM bug where XCB
claims a lack of locking. Setting env. var 'LIBXCB_ALLOW_SLOPPY_LOCK=true' is one workaround
if users refuse to enable compositing. We may investigate this issue in more detail later on.
The file was addedsrc/test/com/jogamp/opengl/test/junit/jogl/acore/TestInitConcurrent02NEWT.java (diff)
The file was modified src/newt/classes/jogamp/newt/driver/bcm/egl/DisplayDriver.java (diff)
The file was modified src/nativewindow/classes/jogamp/nativewindow/NullToolkitLock.java (diff)
The file was modified src/newt/classes/jogamp/newt/driver/x11/DisplayDriver.java (diff)
The file was modified src/newt/classes/com/jogamp/newt/NewtFactory.java (diff)
The file was modified src/nativewindow/classes/jogamp/nativewindow/jawt/x11/X11JAWTWindow.java (diff)
The file was modified src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsDevice.java (diff)
The file was modified src/newt/classes/jogamp/newt/WindowImpl.java (diff)
The file was modified src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java (diff)
The file was removedsrc/test/com/jogamp/opengl/test/junit/jogl/acore/TestInitConcurrentNEWT.java (diff)
The file was modified src/newt/native/X11Window.c (diff)
The file was modified src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java (diff)
The file was modified src/newt/native/X11Display.c (diff)
The file was modified src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsScreen.java (diff)
The file was removedsrc/nativewindow/classes/jogamp/nativewindow/x11/X11ToolkitLock.java (diff)
The file was modified src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsDevice.java (diff)
The file was addedsrc/nativewindow/classes/jogamp/nativewindow/ResourceToolkitLock.java (diff)
The file was modified src/jogl/classes/jogamp/opengl/egl/EGLDisplayUtil.java (diff)
The file was modified src/newt/classes/jogamp/newt/driver/macosx/DisplayDriver.java (diff)
The file was modified src/nativewindow/native/x11/Xmisc.c (diff)
The file was modified src/newt/classes/com/jogamp/newt/Screen.java (diff)
The file was modified src/newt/classes/jogamp/newt/ScreenImpl.java (diff)
The file was addedsrc/test/com/jogamp/opengl/test/junit/jogl/acore/InitConcurrentBaseNEWT.java (diff)
The file was modified make/scripts/tests.sh (diff)
The file was modified src/nativewindow/classes/javax/media/nativewindow/ToolkitLock.java (diff)
The file was addedsrc/nativewindow/classes/jogamp/nativewindow/SharedResourceToolkitLock.java (diff)
The file was modified src/newt/classes/jogamp/newt/driver/windows/DisplayDriver.java (diff)
The file was modified src/newt/classes/jogamp/newt/driver/x11/ScreenDriver.java (diff)
The file was modified src/newt/classes/jogamp/newt/DisplayImpl.java (diff)
The file was modified src/newt/classes/jogamp/newt/driver/intel/gdl/DisplayDriver.java (diff)
The file was modified src/nativewindow/classes/javax/media/nativewindow/AbstractGraphicsDevice.java (diff)
The file was modified src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java (diff)
The file was modified src/newt/classes/com/jogamp/newt/Display.java (diff)
The file was modified src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java (diff)
The file was modified src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java (diff)
The file was modified src/newt/classes/jogamp/newt/driver/awt/DisplayDriver.java (diff)
The file was modified src/newt/classes/jogamp/newt/driver/x11/WindowDriver.java (diff)
The file was modified src/nativewindow/classes/jogamp/nativewindow/x11/awt/X11AWTGraphicsConfigurationFactory.java (diff)
The file was removedsrc/nativewindow/classes/jogamp/nativewindow/jawt/x11/X11JAWTToolkitLock.java (diff)
The file was addedsrc/test/com/jogamp/opengl/test/junit/jogl/acore/TestInitConcurrent01NEWT.java (diff)
The file was modified src/newt/native/X11Common.h (diff)
Commit 285bd9b718621a70f180dff6dfea73092c2b75cc by Sven Gothel
FBObject: Clarify reset(..), resetSamplingSink(..) ; Rename syncFramebuffer(..) -> syncSamplingSink(..)

- reset(..) adds a new argument, boolean resetSamplingSink, allowing to trigger a reset
on the samplink sink as well. Use cases are documented.

- made public: resetSamplingSink()

- Rename syncFramebuffer(..) -> syncSamplingSink(..) to clarify semantics
The file was modified src/jogl/classes/jogamp/opengl/GLFBODrawableImpl.java (diff)
The file was modified src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/FBOMix2DemosES2.java (diff)
The file was modified src/jogl/classes/com/jogamp/opengl/FBObject.java (diff)
The file was modified make/scripts/tests.sh (diff)