| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
| |
atomic java JAR)
- GLProfile, NWJNILibLoader, NEWTJNILibLoader:
Issue Platform.initSingleton() upfront within priviledge block.
|
|
|
|
| |
sizeof(platformInfo)==0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NewtCanvasAWT/GLCanvas (delegation) ; Fix GLCanvas OffscreenLayerSurface usage.
JAWTWindow.destroy():
- No more getGraphicsConfiguration().getScreen().getDevice().close() call,
since the configuration (hence the device) is passed @ creation and owned by the caller.
New Interface 'OffscreenLayerOption', impl. by JAWTWindow (impl) and NewtCanvasAWT/GLCanvas (delegation)
- Abstract offscreenLayer option to be delegated by using classes
- Allow offscreen testing of GLCanvas as well (like NewtCanvasAWT)
Fix GLCanvas OffscreenLayerSurface usage
- common 'createDrawableAndContext()' for context and drawable instance creation
- addNotify() calls createDrawableAndContext() after super.addNotify() to be able
to lock the surface (JAWTWindow) and hence to determine offscreen usage.
- reshape(...) issues recreation 'dispose(true)' in case of using an offscreen layer
- dispose() explicitly destroys the JAWTWindow
NewtCanvasAWT:
- explicitly close the device of the JAWTWindow (as GLCanvas does)
Tests:
com.jogamp.opengl.test.junit.newt.parenting.TestParentingOffscreenLayer01GLCanvasAWT
com.jogamp.opengl.test.junit.newt.parenting.TestParentingOffscreenLayer02NewtCanvasAWT
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Management
- Leave Platform, .. TempJarCache untouched.
- GLDrawableFactoryImpl*: Leave DynamicLibraryBundle(lib-binding) untouched,
for NativeLibrary, JNILibLoaderBase (JNI libs), .. consistency.
- SHARED_ONLY: shutdown shared GLDrawableFactoryImpl* resources and NativeWindowFactory
- COMPLETE: additionally shutdown GLContext*
Clear all cached GL/GLX proc-address and device/context mappings.
- Use new "GLProfile.shutdown(GLProfile.ShutdownType.SHARED_ONLY)" in Applets
- X11GLXDrawableFactory Shutdown: Uncomment close/destroy of shared resources.
- JAWTWindow.destroy(): Close the delegated device.
In case it's X11 this closes the exclusive opened X11 Display.
|
| |
|
|
|
|
| |
JNILibLoaderBase addNativeJarLibs(..)
|
| |
|
|
|
|
|
|
|
|
| |
X11Util:
- shutdown: keep list of displays, if not really closed.
- Init default display name in initSingleton.
GDISurface: Check ReleaseDC and throw exception if fails
|
| |
|
|
|
|
|
|
| |
RegisteredClassFactory: Reference the factories itself instead of the RegisteredClass.
This enables the shutdown hook to clear the factories state,
which is required for proper recreation.
|
|
|
|
|
|
|
|
|
|
|
|
| |
More Robust GLProfile Initialization
- Catch GLException in GLDrawableFactory getWasSharedContextCreated(device) impl.,
which may fail (See comment on Firefox/Chorme EGL deployed library for Windows).
- If getWasSharedContextCreated(devide) fails, set respective factory availability to false,
ie. hasDesktopGLFactory, hasEGLFactory, ..
Add NativeWindowFactory Shutdown
- Currenly a dummy entry, may evolve. X11Util shutdown is issued by respective GLDrawableFactory
|
|
|
|
|
|
|
|
| |
getLocationOnScreenImpl
Since the MacWindow position needs to be changed in concert with the parent,
we need to be triggered to update ours. AWTParentWindowAdapter issues 'updatePosition()'
if DriverUpdatePosition is implemented.
|
| |
|
|
|
|
|
|
|
| |
(position)
DriverUpdatePosition:
Interface tagging driver requirement of absolute positioning, ie. depend on parent position.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NEWT XDisplay Locking
Revert X11Screen RANDR commit 8cecd0c2963d982aa119cbb07698e56b9c271188,
ie. use default 'render' display connection, best results on Ubuntu, Solaris, CentOS (no failures).
Revert X11Util (XInitThreads/XLockDisplay) rational logic, commit 0314be79a7a93931a74fe4322bc78e699d7741e9,
X11Util.HAS_XLOCKDISPLAY_BUG:=true and X11Util.XINITTHREADS_ALWAYS_ENABLED:=true.
Which enables always utilizing XInitThreads() either before or after AWT initialization,
as well as disable all XLockDisplay/XUnlockDisplay locks.
Rever NEWT XDisplay X11 basic Locking commit 50100b85ce5fde48788efbc2211b26fb9d7c9dfd,
ie use null locking if X11Util.HAS_XLOCKDISPLAY_BUG and X11Util.XINITTHREADS_ALWAYS_ENABLED.
|
|
|
|
|
| |
We shall lock a level above due to differentiation of XLockDisplay/RecursiveLock
using X11/AWT ToolkitLock.
|
|
|
|
| |
GraphicsConfiguration
|
|
|
|
|
|
|
| |
DestroyNSWindow0
The CALayer animations (add/remove/swap) confused somewhat rendering (layer position) and
even triggered a deallocation sometimes.
|
| |
|
|
|
|
| |
setToolkitLock(..) swaps the lock thread safe.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
XLockDisplay/XUnlockDisplay shall only be used if XInitThreads() was successful,
otherwise it has no effect (X11 spec).
- Only issue XInitThreads() if firstX11ActionOnProcess==true,
store result to determing whether we can utilize XLockDisplay/XUnlockDisplay.
- If we cannot utilize XLockDisplay/XUnlockDisplay, use RecursiveLock
- NativeWindowFactory: Only return AWTToolkitLock or X11JAWTToolkitLock if explicitly requested
|
|
|
|
|
| |
- remove validateNative()
- don't dispose AWT component, since we are an immutable uplink (was disposed if Window)
|
| |
|
|
|
|
| |
constructor
|
|
|
|
| |
AWTDevice: Remove subtype
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NativeWindow X11AWTGraphicsConfigurationFactory
X11AWTGraphicsConfigurationFactory properly construct a AWTGraphicsConfiguration
encapsulated a native X11GraphicsConfiguration, now available for non JOGL modules, ie NEWT.
AWTGraphicsConfiguration's create() utilizes the X11AWTGraphicsConfigurationFactory
via the generic factory mechanism and hence allows encapsulating a native [X11]GraphicsConfiguration.
NewtCanvasAWT creates/destroys the JAWT NativeWindow on addNotify/removeNotify (reparentWindow) again.
Hence the JAWTWindow is instantiated completly only, instead of utilizing updateConfiguration(..),
which simplifies the mechanism.
|
|
|
|
|
|
| |
instead of constructor for clarity.
- prepare for 'jogamp.nativewindow.x11.awt.X11AWTGraphicsConfigurationFactory'
|
|
|
|
|
|
|
|
|
|
|
| |
AbstractGraphicsConfiguration, if delegation is used.
This change restricts the usage of AbstractGraphicsConfiguration's getNativeGraphicsConfiguration()
to NativeSurface implementations and hence reduces complexity.
NativeSurface implementations are adapted and access to it's AbstractGraphicsConfiguration
is controlled via get/set method avoiding flawed usage (read/write), since read access shall
return the delegated AbstractGraphicsConfiguration, if used.
|
|
|
|
| |
ie. delegated in all cases.
|
|
|
|
| |
remark and native test.
|
|
|
|
| |
(minor edits)
|
|
|
|
| |
leaving privileged block
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
KeyListener handling (Bug 526)
NativeWindow:
- expose 'hasFocus()'
Window:
- 'protected enqueueRequestFocus(..)' -> 'public requestFocus(boolean wait)'
- New: 'setKeyboardFocusHandler(KeyListener)' allowing focus traversal co-op w/ covered TK (AWT)
WindowImpl:
- Impl Window changes (see above)
- Impl 'consumedTag' see commit 3b38957f36d4f89b85730755a41c00892ac70591
NewtCanvasAWT:
- FocusAction only removes the global AWT focus owner.
This fixes a deadlock on the Windows platform of AWT's native peer requestFocus impl,
since it's no more called at this point.
- NEW FocusTraversalKeyListener is set as the newtChild's KeyboardFocusHandler,
allowing traversal to the next/previous AWT component.
AWTParentWindowAdapter:
- focusGained(..) clears AWT focus and propagates focus to Newt child,
non blocking w/ 'requestFocus(false)' (see above)
KeyEvent:
- Document limitations of getKeyChar() (Bug 526)
MacWindow:
- only deliver keyChar on key Typed events, harmonizing platform behavior (Bug 526)
WindowsWindow:
- regenerate the keyCode for EVENT_KEY_TYPED (Bug 526)
X11Windows:
- complete keyCode mapping X11 -> Newt - X11KeySym2NewtVKey()
- only deliver keyChar on key Typed events, harmonizing platform behavior (Bug 526)
Tests:
- GearsES2: Make focus visible
- TestParentingFocusTraversal01AWT: unit test for keyboard focus traversal w/ NewtCanvasAWT
|
|
|
|
|
|
|
|
|
| |
AttachJAWTSurfaceLayer() OSXUtil -> MacOSXJAWTWindow
Threading/sync issue when creating a NEWT window, which issues a Java callback from native code (positionChanged()).
The latter requires a location validation w/ getLocationOnScreen() involved.
Hence getLocationOnScreen() shall not lock the JAWT native resources,
since it may not be ready yet (-> threading/sync issue).
|
|
|
|
| |
.. need to move the attach/detach surface layer NIO methods to a AWT OSX class.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
instance ; Applet's on OS X are working
Generalize OffscreenLayerSurface
- Using new OffscreenLayerSurface allows using this functionality in a clean manner,
ie. no 'dirty' usage of MacOSXJAWTWindow in a JOGL GL class.
- 'Promoting' OffscreenLayerSurface functionality to JAWTWindow
and it's handling to GLDrawableFactoryImpl::createGLDrawable().
- Move MacOSXCGLDrawableFactory's "MacOSXJAWTWindow getLayeredSurfaceHost(NativeSurface surface)"
to NativeWindowFactory "OffscreenLayerSurface getOffscreenLayerSurface(NativeSurface surface, boolean ifEnabled)"
Use local JAWT instance
- Only w/ a local JAWT instance per JAWTWindow it is possible to switch between
offscreen-layer and onscreen. We also have to determing offscreen-layer lazy
at surface lock, since only at that time we have knowledge whether it's an Applet
or not.
+++
ContextUpdater:
Use local pthread mutex, add DEBUG output
JAWTWindow/NewtCanvasAWT:
Adding methods to request offscreen-layer-surface (if supported),
besides 'if applet' this may trigger the new functionality.
+++
Applet's on OS X are working:
- OS X 10.6.4
- Safari:
- Hangs for a while at start .. whole screen freezes .. approx. 10s
- Sometimes crashes when Applet stops - after all our resources are released!
- Keyboard input isn't assigned sometimes.
- Otherwise .. works well, incl. offscreen/onscreen parenting
- Firefox 8.0:
- Hangs for a while at start .. whole screen freezes .. approx. 10s
- Sometimes crashes when Applet stops - after all our resources are released!
- Keyboard input is never assigned.
- Otherwise .. works well, incl. offscreen/onscreen parenting
- OS X 10.7
- Safari:
- Sometimes crashes when Applet stops - after all our resources are released!
- Keyboard input isn't assigned sometimes.
- Otherwise .. works well, incl. offscreen/onscreen parenting
- Firefox 8.0:
- Sometimes crashes when Applet stops - after all our resources are released!
- Keyboard input is never assigned.
- Otherwise .. works well, incl. offscreen/onscreen parenting
|
|
|
|
|
| |
MutableGraphicsConfiguration allows derivations to set the chosen capabilities,
hence it is a non public API from which eg. JOGL GraphicsConfiguration derive.
|
|
|
|
|
|
| |
reparenting
Test: enable NEWT 'onscreen' case
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I was too fast introducing these accessors, since they are currently not needed
and hence redundant.
Complete
- 7bc4c218b47033cb66f4eb5e707a86a0a4e60cff
Partial in regards to the holder interfaces only:
- d8fa00d35a49f4faf5f04aeb7e2bba4e972965f5
- f51e3dad6c4bd1f6d0001cecf6a0f692400ed602
- 46542168d64b37f544f61802693f15b59b224e4e
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
attach/detach our GL one
- it seems to be more stable, having one root CALayer attached to the JAWT_SurfaceView forever
- tackles crach at GL layer destruction
- proper release of all GL layer resources
- now final [gl-layer dealloc] happens at very destruction of JAWT object,
even though it was removed from root-layer earlier (and all other references)
- see comment in MacOSXWindowSystemInterface-pbuffer.m :: createNSOpenGLLayer(..)
- at least no more crash .. and resource release ASAP, but the GL-layer itself (see above)
|
|
|
|
|
|
|
|
|
|
| |
Impl. SurfaceChangeable (regression 8f5465396fe429ce6b7ecae808416691271c7867)
- offscreenSurfaceLayer code requires instanceof SurfaceChangeable
- overwrite JAWTWindow size getter: use surfaceSizeChanged() values if used.
Proper invalidateNative()
- detach JAWTSurfaceLayer if set
- destroy dummy NSWindow (was typo)
|
|
|
|
|
|
|
|
|
|
|
| |
updateGraphicsConfiguration() of commit 46542168d64b37f544f61802693f15b59b224e4e
While introducing NewtCanvasAWT's lifetime reference of (JAWTWindow) nativeWindow
using updateGraphicsConfiguration() to determine the actual config values at addNotify(),
it was overseen that the AWTGraphicsDevice needs to be re-validated.
JAWTWindow's validateNative() ensures that the AWTGraphicsDevice reflects the platform
native handle where required (X11).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
conflicts with setSize()
This fixes the NEWT OffscreenWindow conflict w/ setSize()
which represents the action of changing the window's size.
SurfaceChangeable's surfaceSizeChanged() merily notifies the actual size.
JAWTWindow: Remove setSize() since it propagates the surface size upstream only.
MacOSXJAWTWindow is not SurfaceChangeable complete (no surfaceSizeChanged).
|